# All Questions

1k views

### ErrorListPlot Legend with Markers

I'm trying for some days now to integrate markers in my legend. I have a ErrorListPlot with markers and a legend but difficulties to realize the markers in the legend as well. Thanks a lot for your ...
147 views

### How to export a plot into a file?

I am trying to save some graphics into a file, and it seems impossible. ...
825 views

### Does Mathematica solve transfer functions differently to Matlab?

Please note this is an edit to the same question posed a few weeks back: I'm using Mathematica to derive the transfer functions for a three phase AC/DC inverter. Given below is the code for the ...
270 views

### How I get random keys from keyboard for game controls?

I'm trying to make moving object using controls. I'm trying to do this using Buttons. The code is ...
159 views

### Making ColorSetter work like a PasteButton

I might be missing something obvious here. I am building a palette for constructing code to make certain graphics. The idea is that my colleagues can click buttons instead of having to know the right ...
159 views

### Simplifying Complex Numbers that contain physical units

I am trying to evaluate the following: Simplify[Meter Nano Re[(a + I b)/(Meter Nano)], Assumptions -> Element[{a, b}, Reals]] However, Mathematica returns: ...
212 views

### OpenGl Z-Order Equivalent in Mathematica?

I am trying to draw the arrows in this picture on top of the two parallel plates. In OpenGL I would just set the 4th coordinate the z-order to be closer. Any ideas how to draw them on top in ...
145 views

### Looking for documentation on code editor's color/style highlighting

Where can I find reference documentation (as opposed to, e.g., tutorials, etc.) on the meanings of the various color/style highlightings that Mathematica automatically assigns to code as one types it? ...
298 views

### Computing the sign of the real part of eigenvalues in a 3D linearized system with 3 parameters

So I have this dynamical system given by: \left\{\begin{aligned} x' &= a(y-\phi(x))\\ y' &= x-y+z\\ z' &= -by \end{aligned}\right. where $\phi(x) = \mu x^3 - \nu x$ and $a,b,\mu,\nu$ ...
90 views

### How can I get a Button to evaluate an expression containing Get? [duplicate]

I have problems making Button evaluate an input like this one: Button["Load", Get["/Users/simonlausen/Desktop/Input/ex1.mx"]] ...
301 views

### NMinimize problem again

Following up my previous question which got great replies, I am now trying to do ...
708 views

### Getting over Mathematica Bar Chart Limitations….

I am trying to create a pareto chart for some non technical folks and having the hardest time formatting it correctly… Here’s my sample code: ...
262 views

### Computing the minimum distance in a contour plot

I have the following Mathematica code ...
1k views

### Extract connected components from PNG image file and write to individual PNG files

Given the PNG image below with the three leaves in it, I'd like to extract each individual leaf and write it to its own PNG file, using Mathematica 9. Note that in the original image, the box bounding ...
128 views

### Is there documentation on the comparative performance of Mathematica functions? [duplicate]

Recently I have been solving some Project Euler problems. I find there are always several ways to do the same thing. For example, one could join two lists like this: ...
353 views

### Exporting German Umlauts to PDF and importing them doesn't work - character encoding problem

I am using Mathematica 9.0.0.0 under German Windows 32bit. I am on trying to export and import German text to PDF and re-import it. It seems that there is a confusion about the character encoding. It ...
312 views

### Is there a summary of answers Head[] can give?

Sometimes you need to check for the type of an expression. You use Head[data] to get answers. Some data: ...
1k views

### Plotting the solutions to a transcendental equation

I am trying, to no avail, to use Mathematica to produce a plot in (x, y)-space of the solutions to the equation Cos[Sqrt[y]] + Sin[Sqrt[y]]/Sqrt[y] == Cos[x] ...
493 views

### List version of SphericalPlot3D

could you give me some input on how to create a list version of SphericalPlot3D[r[theta,phi],{theta,min,max},{phi,min,max}] When r[] is an explicit analytical ...
81 views

### Tooltip and table in plot [duplicate]

Plot[Tooltip@{1. k^2, 1.2 k^2, 1.4 k^2, 1.6 k^2, 1.8 k^2, 2. k^2}, {k, -2, 2}] gives But why does ...
668 views

### How to add lists with unequal length?

Given lists of unequal lengths, I want to add them together element-wise, treating missing elements as zero. For example, {1, 2, 3} + {a, b} + {x} should give ...
747 views

### Get both output and return code of external program

Run["program"] will run an external program and return the return code. Import["!program", "String"] will run the program and ...
628 views

### How can I prevent Mathematica from evaluating or “simplifying” an expression?

Simple example: ...
76 views

### Why does Play fail to produce a widget sometimes?

If I define: aNote[x_] := Sin[440 * 2 * Pi * x]; then this works (i.e. it produces a widget with a Play button, and clicking on this button produces an A note): ...
380 views

### How to control the speed in Manipulation

As the title says, I want to control the speed when I use Manipulate. I have the following piece of code ...
180 views

### Is there a relatively easy way to add the “Cone of Influence” to a waveletscalogram?

I am analyzing time series data using the ContinousWaveletTransform function and plotting the results with WaveletScalogram. I ...
496 views

### Benchmarking expressions

It often happens that I'd like to know which of two or more alternative expressions (that should evaluate to the same value) is fastest. For example, below are three ways to define a function: ...
192 views

### How can you show data in a CDF Animate Graphic?

I want to show (dynamically) the curvature and torsion in a CDF to understand the quantitative measure of any points. Do you know what I have to do to show data in a ...
2k views

### Programming a numerical method in the functional style

I am new to Mathematica and I would like to learn a bit more about functional programming. At the moment I have assignments like programming different numerical methods (for integration: ...
307 views

### How can I create input fields based on the user's choice from a popup menu?

I'm trying to create an interface with Mathematica. However, I need some instructions concerning the code below. This is about 10% of what I have in mind, but first I need to know how can I create ...
265 views

### Convergence and value of a complex power series

I've done a little math and I got the following power series expansion of $\log z$ about $z_0=-2+i$. $$\log z=\log(-2+i)+\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n(-2+i)^n}[z-(-2+i)]^n$$ I've shown that ...
157 views

### Could a package be composed of references?

Could a package be composed of references (e.g. usage messages)? Do the code for an induvidual function implemented in a package has to be physically in that package file where it is referenced (i.e. ...
179 views

### How do I generate a set of n-tuples containing integral solutions to a linear equation provided certain constraints?

Let $m,k,p$ be fixed positive integers. I want to create a table of k-tuples $(x_1,x_2,\ldots,x_k)$ comprised of solutions in positive integers to the equation below: ...
275 views

144 views

### Define new number set

May seem strange at first, but can you make mathematica change the value of 0 to 10 and 11 to 1 for all occurrences. Let me explain: I'm looping through a matrix and for each element, I want ...
143 views

### Creating a list from other lists and varying the number of elements that get added

Suppose I have listA = {M, F} and ListB = {a,b,c} I want to make a new ...
531 views

### How to define a vector with automatically added symbolic elements with subscripts

I want to define a vector lets say k containing elements Symbolize[Subscript[k, 1]], k2, k3 ... etc. When I define lets say k4 . I want the symbol automatically added to vector k. Something like ...
1k views

### Numerical partial derivative

For a one-variable numerical function, it's simple to calculate the derivative at a point with Derivative as Szabolcs has pointed out before: ...
209 views

### HighlightGraph with style

In this picture you see a graph. The shortest path between vertex 5 and vertex 3 is highlighted in red. Instead I want blue highlighted edges of thickness 10. ...
148 views

### Differentiating with respect to vectors of unspecified length

Given a function defined by f[x_,y_] := Sum[ x[[i]] (g[y[[i]]] - g[Total[y]] - Log[x[[i]]]), {i, 1, Length[x]}] I can easily calculate the derivative for a fixed ...
426 views

### How to make a volume CUDA rendering isometric?

I just realized that the output of CUDAVolumetricRender[] uses (quite marked) perspective, which I do not want (for scientific data representation, it can be very ...
237 views

### Can CUDAVolumetricRender be combined with other 3D graphics?

I have volumetric data, which I can render using CUDAVolumetricRender[]. However, I cannot seem to find a way to combine it with other 3D graphics, such as adding a ...
2k views

### NMinimize usage

I would like to minimize functions including the following. NMinimize[{1 - (1 - 1/n)^x - x/n, n > x, x > 1}, {n, x}] However Mathematica complains about ...
3k views

### Importing multiple files using a for-loop

once again I am stuck solving a seemingly easy problem :( I would like to make a List of tables by importing data from several txt-Files. Importing the data into a table works so far and I am able to ...
1k views

### Mathematica for teaching orthographic projection

Edit: All the four answers to this question are great, and if you're interested, you should take a look at all the answers. Nevertheless, belisarius' code was accepted since it was closest to what I ...
272 views

### Color lost when saving Mathematica cell as HTML

Question 1(Color Lost Question[Solved by using Item]): When I evaluate the cell generated by ...
306 views

### Strange behaviour of PolyLog Function

I discovered some strange behaviour of the PolyLog[] Function in Mathematica which seems to me like a bug in the function implementation. It looks like ...