# All Questions

979 views

### Is Mathematica a Turing-complete language?

Is Mathematica a Turing-complete language? If so, how can that be proved? If not, why?
54k views

### Generate a Unit Circle Trigonometry

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :
2k views

### sprintf() or close equivalent, or re-implementation?

Is there a sprintf() command (some command that takes a printf-style format string and a list of values to insert into the ...
487 views

### Phase portrait on a cylinder

It is very nice and very easy to make a sketch of a phase portrait with StreamPlot. For example, for the classical pendulum, defined by $$\dot x=y,\\ \dot y=-\sin x,$$ The code ...
261 views

### Export Plots to PNG in Printout Style

When creating a plot in Mathematica 10 (OS X 10.9.4 and Win 7) the FrameLabel and Ticks are greyish and only the Frame itself is black (see Screenshot bellow). Only when exporting the plot to PDF all ...
261 views

### How to determine numeric equivalent of Tiny, Small, etc. image sizes for Graphics?

Is there a way to find the numeric equivalents of Tiny, Small, Medium, and ...
165 views

### func::usage needs to be run twice? [duplicate]

There is an annoying problem that I can't figure out why it's happening. I have defined a usage for a my function tensorA: ...
2k views

### How do I plot the unit normal field for a surface?

The question is pretty much in the title; I'm about to teach my multivariable calculus students about orientations on surfaces, and I would like to be able to show them pictures. Any ideas?
297 views

### How to keep some of the results of the NestList

I'm using some iterative arithmetics to calculate wave propagation with the help of NestList. I have to use a small step size for iteration to guarantee the accuracy, which lead to too much data (e.g, ...
863 views

### Higher order SVD

Does anyone know how to do a higher order SVD in Mathematica ? A good reference seems to be here http://www.sandia.gov/~tgkolda/pubs/pubfiles/SAND2007-6702.pdf but I don't understand their formalism ...
876 views

### Suppressing negative roots in Mathematica

Problem Using Mathematica's Solve operator can sometimes lead to an output involving a positive and negative root (say when solving for a variable such as ...
390 views

### ImageAlign doesn't always work correctly

I've been working with ImageAlign in Mathematica 8 and I'm having trouble getting it working reliably. Perhaps there are some subtleties that I'm not yet aware of? ...
634 views

### Elegantly split a matrix into positive and negative parts?

I have a matrix $M$ of real components, and I want to split it into two matrices $M^+$ and $M^-$ of the same dimensions as $M$, where $M^+$ contains the positive components of $M$ (the remaining ...
892 views

### Numerical solution of coupled ODEs with boundary conditions

I have to solve the following set of ODEs and just can't get good results using Mathematica $$r\frac{d}{dr}\left(\frac{1}{r}\frac{d}{dr}A(r)\right)-\xi^2F(r)^2\left(A(r)-1\right)=0$$  ...
354 views

### Faster way to convert triangle list to edge list with no duplicates

I have a list of triangles returned by a Delaunay triangulator, in the following format: ...
464 views

### Dropping n consecutive terms from a list periodically

Suppose I have the following list lis = Range[100]; and I want to remove n consecutive terms periodically from the list. For example suppose I want to drop terms ...
2k views

### How can I change the color of the bar in a ProgressIndicator?

I want to change the color of the progress bar in a ProgressIndicator. I want the progress bar to be red instead of green. For this purpose I wrote the following ...
197 views

### Layout a second graph of the same nodes in the same way

I have a number of graphs with the same nodes. I would like to be able to somehow save the layout that results from the spring embedded results of one graph (the first image), and have the other ...
538 views

### Using Goto and Label in compiled function?

Below I post some rudimentary code to show that there is something wrong using Goto and Label commands in compiled functions (or I believe there is something wrong). It seems that the command Label is ...
311 views

### Unexpected behavior from VectorPlot

I am surprised at the behavior of VectorPlot in the following sense: plotting a vector field and examining the output at a point $(x_0,y_0)$ reveals that Mathematica doesn't draw the tail of the arrow ...
322 views

### What is an efficient way of selecting multiple colors via Manipulate?

Background: The following snippet is what I (intend to) use in a Manipulate form where up to 12 different colors can be selected: ...
185 views

### Solve[ ] with Method -> Reduce gives a different result than Reduce[ ]

Why does Solve[Sqrt[x + Sqrt[x]] - Sqrt[x - Sqrt[x]] == m Sqrt[x/(x + Sqrt[x])], x, Reals, Method -> Reduce] give a different result than ...
603 views

### Find maximum value of interpolation function - obviously wrong result

Minimizing and maximizing interpolation function has already been asked and answered, see here for example. Yet, I observe a strange behaviour. Well, I can understand that the wrong guess of ...
186 views

### Unwanted PlotMarkers appear at non-existent places

In this simple code ...
190 views

### How to collect expressions from cells created by Print?

I have a notebook where evaluation of a certain cell produced hundreds of adjacent output cells using Print. I need to create a list containing all expressions from ...
672 views

### List comprehension in Mathematica

Python supports a concept called "list comprehensions". Following is sample example ...