0
votes
1answer
172 views

How to generalize a formula?

This is a piece of my code: ...
12
votes
4answers
1k views

How to select and delete all Output cells?

How to select and delete all Output cells in multiple notebooks programmatically without needing to (manually) opening them? How to define a hot key for deleting all Output cells within a notebook ...
0
votes
2answers
247 views

How to do equality check of a large matrix and get the corresponding index position?

Say I have a matrix A = 1000 x 5, and I want to compare it's first element (uppermost top left) to each of the 5 elements in the first column of matrix B of size 5 x 5. Whenever the first time the ...
8
votes
1answer
201 views

Testing for primality in quadratic rings?

Testing for primality in $\mathbb{Z}[\sqrt{-1}]$ in Mathematica is easy: PrimeQ[n, GaussianIntegers -> True] But how can I test for primality in, say, ...
3
votes
1answer
106 views

Specifying a graphics object for the width of a median marker

In a previously posted question VLC used the element specification {"MedianMarker", filledCircle[10], Black} in a box and whisker chart, where ...
10
votes
2answers
636 views

Can Wolfram System Modeler models be published in CDFs?

Is it possible to publish or distribute Models generated with WSM in CDF format (to interested people that do not have Mathematica and/or WSM)
0
votes
1answer
131 views

Bad function evaluation

I am having some trouble with this function ...
3
votes
1answer
156 views

How can I allow a user to input a list using parentheses and convert this to Mathematica notation dynamically?

I have the following dynamic module. It works. The problem is that whenever I try to make the variable list or the variable s dynamic the code doesn't work. My goal is to allow students to enter a ...
6
votes
3answers
368 views

How can I stop the blinking when rotating a Graphics3D? [closed]

I wrote a function interactiveDesign that returns different Graphics3D items in a list. Then I call the function ...
12
votes
1answer
750 views

Plotting graphics as ASCII plots

I'm occasionally in a situation where I have to use Mathematica on the terminal. I'd like to visualize the solutions I get from NDSolve, but when I use ...
3
votes
1answer
617 views

How to solve this equation with positive integers as a solutions?

This is a problem of United Kingdom Mathematical Olympiad. Find all triples $(x,y,z)$ of positive integers such that $$\biggl(1+\dfrac{1}{x}\biggr)\cdot \biggl(1+\dfrac{1}{y}\biggr)\cdot ...
24
votes
2answers
389 views

What's the difference between these two ways of specifying dependent packages?

What's the difference between these two ways of specifying dependent packages? Method 1: BeginPackage["foo`bar`", {"xxx`", "yyy`"}] Method 2: ...
5
votes
1answer
398 views

Accessing the graph Thinning produces without losing all the edges' lengths/slopes

This is a follow up to the OCR question I had earlier. What I want to do is to use Thinning to create "skeletons" of images of characters and then compare their shapes, utilizing such properties ...
3
votes
1answer
553 views

How to make vertical frame label read top down

In Mathematica, default frame label will put labels at the bottom and the left. The label on the left reads from the bottom to the top. I would like to also put label on the right of the frame, but ...
8
votes
1answer
350 views

Symbolic Integration along contour: branch cut problem?

Context Following this question on path integrals in the complex plane, having defined again a numerical and symbolic integrator along a path as ...
11
votes
2answers
986 views

NSolve gives additional solutions that don't satisfy the equations!

I am trying to solve the following polynomial equations in Mathematica: ...
5
votes
2answers
306 views

Median marker style in BoxWhiskerChart

I was trying to adapt the BoxWhiskerChart to obtain a minimalistic quartile plot, like this: What I obtained is the plot below that is, however, unsatisfying; ...
9
votes
1answer
156 views

Algorithm used by IsomorphicGraphQ

I'd like to know which algorithm is used to test if two graphs are isomorphic?
1
vote
1answer
434 views

How to plot population growth model?

How would I draw the graph of a function dy/dt=((Ry^2)/T)-Ry in Mathematica? I have tried a few times but the constants are confusing me.
3
votes
2answers
274 views

Is there a way to “lock” some cells in a notebook?

Is there a way to "lock" some cells in a notebook so they can't be edited? It's usually input cell that's documenting some functionality. I'd like other readers of the notebook to be able to execute ...
1
vote
1answer
233 views

How to find 4 unknowns?

There are 4 unknowns constants: a,b,c,p. The variable is ...
3
votes
1answer
84 views

Is it possible to print more than last line with Get (<<) without using Print commands?

I want to run my Mathematica scripts from the terminal and I want it to print lines like MATLAB would. That is, suppress output by ending a line with ;, and ...
3
votes
4answers
222 views

How to create a composite function from a variable number of components?

Background of the problem: A patient takes a drug every $X$ hours with a half-life of $Y$ hours. How much of the drug will be (exactly) in his system after $h$ hours? For $X=24$, and $Y=24$ I made the ...
0
votes
1answer
571 views

using Mathematica's matrix multiplication in C++

Is there any way that I can utilize Mathematica's matrix multiplication in a C++ program? I'm making a 3D graphics engine (for class) in C++ and I would really like to use Mathematica for all of my ...
41
votes
2answers
2k views

Detecting grid lines in a raster image

Motivation: Last October 7 there was a presidential election in Venezuela. Although the opposition saw an unprecedented increase in its votes, the government votes increased even more resulting in the ...
11
votes
3answers
525 views

Labeling plots without evaluation

This is my first question here so please excuse my mistakes. Let us consider a rather contrived example: ...
9
votes
4answers
478 views

How to implement dual numbers in Mathematica?

I wonder how can I implement dual numbers in Mathematica, so that all functions work well with them (as with complex numbers). Particularly, for each function $f$, ...
7
votes
2answers
269 views

Select Cells to End of Notebook

I'd like to create a keyboard shortcut that will allow me to select all of the cells from the current cell until the end of the notebook, similar to how ShiftCtrlEnd functions when editing text in ...
8
votes
3answers
3k views

Given a Table of Plots with some parameter, how would I mark each of the plots with that parameter

I've got a two variable function that I'm plotting against one axis for a few different values of a parameter ...
0
votes
0answers
155 views

Reducing a statement with Mathematica, step by step [duplicate]

Possible Duplicate: Get a “step by step” evaluation in Mathematica I have a list of inequalities combined with quantifiers. And Mathematica is able to reduce to simple statement with the ...
2
votes
0answers
213 views

How can I compute the chromatic index and number of a graph?

I saw a recent question from M.R. and realized there is no function to compute the chromatic index and number of a graph, other than a really slow method in the now deprecated Combinatorica. So, how ...
12
votes
5answers
718 views

How to improve this code for solving the “Mr.S and Mr.P” puzzle?

Mr.S and Mr. P puzzle — "Formalization of two Puzzles Involving Knowledge", McCarthy, John (1987) We pick two numbers $a$ and $b$, such that $a\geq b$ and both numbers are within the range ...
8
votes
1answer
587 views

Prevent PopupWindow from opening multiple windows

PopupWindow objects can be clicked multiple times, opening multiple popup windows for the same object. How can I prevent this? A bit more detail: I have an ...
5
votes
2answers
199 views

How to protect pattern or subexpression when distributing / expanding expression?

I've got an expression like expr = (1-x)(a+b) that I would like to distribute / expand while keeping factors of (1-x) intact, ...
5
votes
1answer
368 views

Numbering element in descending order

How can I numbering the elements in descending order of second elements of sublists? For example, if I have the list which is ...
2
votes
3answers
235 views

Adding elements in the sublists

How can I add the elements in the sublists? For example, if I have the list which is m={{1,3},{2,3},{4,1}} then, the output that I want is ...
2
votes
0answers
823 views

Set Global Maximum Precision

I'm sure this has been asked before, but I've looked around and can't figure it out: How do I set a global maximum precision for a notebook (or in general, globally)? I have a large notebook in ...
4
votes
1answer
326 views

Plotting an inequality with “plot” axis

Whenever I try to plot an inequality with "RegionPlot", all my plots come out in boxed frames. Is there a way to plot inequalities where I get my standard x and y axes crossing each other? For ...
6
votes
2answers
699 views

Why does importing a URL fail the second time and produce a FetchURL::conopen error?

I have Mathematica code that uses Import[] to download URLs. I noticed that first time I use the Import[] command it works. ...
4
votes
1answer
243 views

Maximizing functions with Which statements

I'd like to be able to find the maximum value that my Capex function (see below) generates. This is a fairly simple function so I could just add it up but I have more complex functions of a similar ...
5
votes
1answer
182 views

Why are my images not printing at the expected size?

I understand how (in theory) to get images to be a specific size in inches, but when I follow the documentation, all of my output seems to be scaled down by a factor of a bit less than 70% (e.g., ...
2
votes
1answer
105 views

How can I get NotebookPrint to pass through the system print dialog?

As near as I can tell, NotebookPrint goes directly to the default printer, without employing the system standard process of opening a print dialog first. ...
6
votes
1answer
150 views

How can I restore context menu functionality to a Manipulate that contains Locators?

Before adding a Locator to a Manipulate, I can easily print or export the result using a context menu: But after adding a ...
3
votes
0answers
210 views

Mathematica Complains about Non Symmetric Covariance matrix, when it's not the case

I was doing some fitting with Mathematica7 using NonlinearModelFit. It's quite long the program to do the fit and that's why I am not displaying here ... It goes ok, and I can get the fit parameters ...
3
votes
2answers
276 views

Deleting a row or column of an adjacency matrix while maintaining the associated label

I am currently working with a weighted adjacency matrix for a directed graph, and it contains several 0 columns and rows. With the unaltered matrix, I am able to monitor the relations between vertices ...
4
votes
0answers
195 views

FinancialData property value at a given date

I was trying to get the volatility value of a specific equity on a given day. Based on the Mathematica Help, the syntax is ...
3
votes
3answers
211 views

SetAccuracy behavior

I'm puzzled by the output I get from SetAccuracy. According to the documentation, when SetAccuracy is used to increase the ...
3
votes
0answers
261 views

How to save (large) data generated from simulations

The following is a simple example of a much larger simulation that I want to run Define some processes ...
6
votes
2answers
175 views

Load Mathematica packages from the network

Is it possible to load packages (.m) directly from the network (http, https) without installing it locally?
6
votes
3answers
419 views

Plotting $\omega(k_x, k_z)$ in $(\omega, k)$ plane with assumption of $k^2 = k_x^2 + k_z^2$

I'm currently studying atmospheric-gravity waves and their dispersion relations. For analysis I need to plot the dispersion function: \begin{equation} \omega^4 - \omega^2\cdot C_s^2(k_x^2 + ...

15 30 50 per page