# All Questions

445 views

### How to mark an image?

How can I place a mark, like a cross-hair (to suggest "X marks the spot") and a text label associated with it, at a particular position on an image (mine in particular is ...
2k views

### Filling a polygon with a pattern of insets

I am trying to fill a shape with diagonal lines. I am aware of Texture, but it rasterizes the fill pattern, which is not desirable. Here was my crack at it: ...
465 views

### How to generate a real-time stream of data?

I'm experimenting with Inversion-of-Control (callback) programming patterns, and I would like a way to generate streams of data at specified real-time intervals. I came up with the illustrated way to ...
234 views

### Randomly redrawing part of a random sample that matches a criterion

I would need some (a lot of) help to improve/rewrite some code. Since my real problem is a bit too complicated to explain, I try to show with a simplified scheme what I want to achieve. I create ...
891 views

### ListLogLinearPlot logarithmic axis tickmarks

When using ListLogLinearPlot the abscissa labels every other decade. Is there a way to tell Mathematica to label each decade? I need to use this inside ...
199 views

### How can I run MUnit TestSuites outside WorkBench?

I would like to run MUnit tests inside TestSuite constructs from the command line or a notebook interface without loading the Workbench GUI. I tried ...
2k views

### What are the differences between the “Home Edition” and the regular Mathematica?

The product page for Mathematica Home Edition says: Mathematica Home Edition is intended for hobbyists and enthusiasts alike, for non-professional use. If you wish to integrate Mathematica in your ...
160 views

### CDF plug-in and animation controls

I've read through all the Q and A on the CDF plug-in and still am puzzled. I've managed to create some webpages with CDF content, it's working fine except when you reveal the animation menu and use ...
2k views

### How to avoid returning a Null if there is no “else” condition in an If contruct

I need to use If but with only one option that is if "a" then do "b", else do nothing. So I wrote If[a,b] but the problem is ...
260 views

### Does Mathematica on Mac OS use virtualization for certain functions?

I'm evaluating this code in Mathematica 8.0.0 on Mac OS X 10.6.8: ...
602 views

### Controlling the time step in NDSolve?

I generally use NDSolve for stiff non linear partial differential equations of 4th order. I find that a BDF1 method generally does well to placate my beast of a PDE. I've also tried out ...
281 views

### Facegrids at ticks

I want to plot a 3D graphic and I want facegrids at the ticks that I specify. I've tried several solutions but I cannot get this working. The result with the code provided below is that it does its ...
428 views

### Memory Leak in Frontend - anyone know a workaround?

When using Rasterize on a Graphics expression composed of many differently coloured Graphics objects memory is allocated in the frontend which is then not released or reused when a similar graphic ...
2k views

### How do I draw a DensityPlot in polar coordinates?

I am trying to plot $J_m(\chi_{mn} r) \cos(m\phi),$ where $J_m(\chi_{mn}) =0,$ as a DensityPlot in polar coordinates (solution to 2D wave equation in polar ...
1k views

### Are built-in Mathematica functions already parallelized?

I've been noticing something strange since updating to Mathematica 8, and that is that occaisionally I'll see that the MathKernel is using up to 800% CPU in my Activity Monitor on OS X (I have 8 ...
2k views

### How to extract sample values from an imported WAV file?

Suppose I read a file with B = Import["something.wav"] Now how can I obtain a list of sample values?
1k views

### Can 2D and 3D plots be combined so that the 2D plot is the bottom surface of the 3D plot boundary?

I have a ListlinePlot function, that I would like to combine with both a Graphics3D plot and a ...
597 views

### When using GraphPlot with an adjacency matrix, how can I make Mathematica draw exactly one self loop for any non-zero weight?

I have tried using the option MultiedgeStyle->None, but apparently Mathematica doesn't treat self loops in the same way it treats edges. For example, I find ...
155 views

### Issues with a Counter that is tallying term appearances

I am working with an array of textfiles, trying to see how frequent certain terms are. However, I am running into some difficulty with my running counts of bigram frequency. Here is a snippet of my ...
302 views

### Abort not aborting

I have a relatively simple bit of code that looks like the following: ---some code here--- If[statement, Abort[]]; ---more code following--- However, while ...
796 views

### Orthonormalization of non-hermitian matrix eigenvectors

When using Orthogonalize[] one can specify which definition of "inner product" is to be used. For example, ...
4k views

### How to make a 3D globe?

There are many ways to create a 3D Earth that is rotatable (see here, here, related here), but most of them have some drawbacks. These issues mainly stem from either ...
728 views

### Transpose uneven lists

Is there a quick method to transpose uneven lists without conditionals? With: Drop[Table[q, {10}], #] & /@ Range[10] Thus the first list would have the ...
545 views

### Using Texture to color countries according to their timezones

So I'm trying to make a world map, where each country is colored according to its timezone. Except, for countries with multiple timezones, the country is filled with vertical stripes of colors ...
181 views

### NIntegrate is resetting my variables and not giving me a result?

I am trying to check if mass conservation holds by integrating the area under a curve but to no avail. ...
291 views

### What does MaxStepFraction do?

I find that with NDSolve[...] while solving a partial differential equation, changing the MaxStepFraction from ...
392 views

### Export to file from ParallelDo loop

I currently have a Mathematica code similar to: ...
303 views

### Setting the DifferenceOrder Option

I've been playing around with Method in NDSolve[...] and can't quite seem to figure out how to force ...
249 views

### Convert operator to string

How to programmatically convert an operator such as Equilibrium into its displayed form as a string? The conversion should work like this: ...
568 views

### How do I get rid of the overlap of gridlines and tick mark labels?

I wish to include the plot generated by the following Mathematica code ...
462 views

### Modifying a List in a function in place [duplicate]

An example will be most specific: func[list_, column_] := list[[All, column]] = Map[#*2 &, list[[All, column]]]; This throws errors. I want to avoid doing ...
360 views

### How to reduce the memory necessary for the image? [duplicate]

Possible Duplicate: Exporting graphics to PDF - huge file I have a figure that is created to use in a paper. Here it is: ...
108 views

### How to edit the text coming together with the numeration of pages in pdf produced out of a notebook?

I am writing a text that I am going to publish on-line. When I transform it from the notebook into the pdf format I get the numeration style typical for Mathematica: I would like to edit the text ...
2k views

### Strategies for simplifying complicated expressions

I have a very complicated expression involving trigonometric functions, complex numbers etc. You may find it here as it is too long to be pasted here. You may also find a screenshot of it here. ...
625 views

### Listing the functions defined in a package

Assume that I know a package's (Context?) name that is loaded. Now I want to list the functions defined in this package. How can I do it? I remember that I found a way once, but I cannot re-find it. ...
514 views

### Loop optimization

I wrote this to generate a 6D distribution of particles. ...
659 views

### Mathematica Precision

How can I set the output precision of the following statement to 10 decimal places? I was looking through the documentation, and for some reason, all I could find was ...
246 views

### Adjusting placement of control objects in a row within a panel

My minimal example ...
613 views

### Sequentially numbering a nested list

I've got a nested list {a, b, {c, d}, e, {f, {g, h}}} which I want to magically transmogrify to ...
715 views

### Trying to prove that $x\sin(\frac{\pi}{x})\ge\pi \cos(\frac{\pi}{x})$ for $x\ge 1$

Consider the function f[x_] := x Sin[Pi/x] I want to prove that this function is increasing for $x\ge 1$. This can be done with the first derivative. We have to ...
358 views

### Unicode-aware string functions?

I've recently discovered that ToUpperCase is quite unreliable on non-ASCII input: ...
760 views

### Emacs key bind on Mathematica Linux

This might not be Mathematica specific question but if there is anyone who can use Emacs keybind on Ubuntu Linux, would you share how you realize it? I'm using Mathematica student edition both on ...
163 views

### Manipulate not working inside DialogInput

Some controls do not appear to work with Manipulate inside a DialogInput. For example: ...
772 views

### Bug in Integrate for Mathematica

Consider the following: ...
597 views

### Interactively extract points from a plot (ListPlot or SmoothDensityHistogram)

Is there a way to dynamically define a polygon on a plot (I'm working with ListPlot and SmoothDensityHistogram) to select a ...
6k views

### How to add a vertical line to a plot

In the plot below I would like to add two vertical lines at $x = \frac{\pi}{15} \pm \frac{1}{20}$. How can I do that? ...
582 views

### Entering block matrices for an arbitrary matrix size

Background: How to enter matrices in block matrix format? and the following: I want to create $$f(A,t) = \left [ \begin{matrix} A & t \\ 0 & 1 \end{matrix} \right ]$$ where $A$ ...
294 views

### FindInstance with a Diophantine equation seems to go on forever

I tried to find a non-trivial integer solution to the equation $$2012^2=a^2+b^2+c^2+d^2+e^2$$ with Mathematica but the computation takes minutes; I might be doing something wrong. ...