# All Questions

3answers
855 views

### Prepend Information to Warning Messages

I have a function running within a Do loop that sometimes issues a warning. I'd like to prepend the warning with the loop ctr so that I can go back and debug that instance later. Basically, I would ...
2answers
981 views

### Why does Simplify ignore an assumption?

Here is the example: Simplify[x + y, x + y == a] Simplify[x + y, x + y == 5] Mathematica 9 output: x+y 5 I expect the ...
6answers
3k views

### Extruding along a path

I'm trying to render a 3D image of a path by extruding a circular cross-section along the path, creating a "snake-like" path. Here is an image I found to illustrate: I can't seem to figure out if ...
1answer
1k views

### Customizing syntax highlighting for private cell styles

Is there any way to set up a cell style with a particular syntax highlighting? For example, I'd like to have a CProgram cell to write in blue the C special words. I have done it by setting ...
5answers
2k views

### How to splice together several instances of InterpolatingFunction?

I have a set of InterpolatingFunction returned by NDSolve which are valid over different (but overall continuous) domains. How ...
2answers
4k views

### About the number format in ticks

I want to LogPlot a function, but I have the trouble in the number format in the ticks. For example, ...
3answers
1k views

### How to load a package without naming conflicts?

This question applies to any package, but I encountered this problem while working with graphs. There are symbols in the Combinatorica package (such as ...
1answer
3k views

### Does Mathematica support variable frame rate for any video format, in analogue of GIF-style “DisplayDurations”?

The good old GIF animation format allows us to set the duration of each individual frame in the animation separately. This is especially useful if some frames in ...
4answers
3k views

### Is it possible to prerender animation in Wolfram Mathematica?

I have a DensityPlot which is evaluated for a long time. I wish to use it with animation, but it is absolutely inapropriate. Is it possible to render animation ...
6answers
5k views

### Replacing composite variables by a single variable

To replace a single variable by another variable, one can simply use the the replace all (/.) operator (e.g., ...
3answers
5k views

### Find all roots of an interpolating function (solution to a differential equation)

I'm trying to find all the roots of the solution to a differential equation. Using NSolve or Reduce I don't get the roots, so I'm using an iterative method which I found in physicsforums.com. This ...
5answers
3k views

### How to find rows that have maximum value?

Suppose if I have following list { {10,b,30}, {100,a,40}, {1000,b,10}, {1000,b,70}, {100,b,20}, {10,b,70} } How to find rows that have max value in ...
5answers
5k views

...
4answers
16k views

### Creating a table/Matrix during a For loop

I have a For loop (with i as a counter), which calculates different values (y1, ...
3answers
538 views

### Why do buttons with ChoiceDialog freeze the front end?

Pressing the button below will freeze my front end. An unpainted white dialog box comes up, then it completely freezes, and I need to forcibly kill the front end. CPU usage stays at zero during ...
3answers
2k views

### Using D to find a symbolic derivative

I need to do the following: Define a function Take the derivative of this function and have a look at the symoblic representation Substitute in some values With the bonus that I want to use the ...
7answers
21k views

### Labeling individual curves in Mathematica

I need to create a plot for export and inclusion in a report. Is there a better way to label curves than PlotLegends? From what I've read and my personal ...
6answers
2k views

### V10's Operator Forms - what are they good for?

V10 introduces an operator form for several functions perhaps primarily due to their role in queries as part of introducing data science functionality. At first pass it seems a lot of effort to add ...
5answers
871 views

### Placement of Condition /; expressions

It is my practice to place Condition expressions on the left side of := and :> in almost ...
2answers
8k views

### How to calculate contour integrals with Mathematica?

How to calculate the integral of $\frac{1}{\sqrt{4 z^2 + 4 z + 3}}$ over the unit circle counterclockwise for each branch of the integrand?
5answers
2k views

### Partition a set into subsets of size $k$

Given a set $\{a_1,a_2,\dots,a_{lk}\}$ and a positive integer $l$, how can I find all the partitions which includes subsets of size $l$ in Mathematica? For instance, given ...
4answers
4k views

### Fastest way to calculate matrix of pairwise distances

It is a very common problem that given a distance function $d(p_1,p_2)$ and a set of points pts, we need to construct a matrix ...
2answers
2k views

### Open Excel file with Mathematica

I would like to open an Excel file and manipulate it as a COM object. While I'm able to open an instance of excel with ...
6answers
611 views

### Constructing symbol definitions for With

I would like to be able to define two arrays, one containing symbol names and one containing the values of those symbols, for use in constructs such as With. For ...
1answer
14k views

### Is it possible to export the equations from Mathematica to MATLAB?

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?
3answers
2k views

### Reading periodic elements from a large file

I have a large binary data file (big endian) with 100+ million "rows" of 11 elements, combination of floats and integers. This is the format: ...
3answers
766 views

### How to flush machine underflows to zero and prevent conversion to arbitrary precision?

I'm working on some pretty intense computation in Mathematica; when my code started running slowly, I tracked the source of the problem to Exp[]. I need to ...
1answer
584 views

### Shorter syntax for Fold and FoldList?

I find it tedious to write out the following: a = {1, 2, 3, 4}; Fold[f, First @ a, Rest @ a] f[f[f[1, 2], 3], 4] It ...
4answers
6k views

3answers
571 views

### Help on evaluation control?

I want to plot series of slopes: x, 2x, 3x, 4x, 5x, 6x... I'm trying to do this: ...
3answers
5k views

### Metaprogramming in Mathematica

Being functional, and having no "quotation", i.e. essentially treating data and programs semantically same, Mathematica seems naturally capable of doing metaprogramming. But could anyone construct a ...
1answer
3k views

### Profiling from Mathematica

I've always wished I could do some profiling like you get in Wolfram Workbench, but directly from Mathematica, without using or having Workbench. If it is possible, how can I do it?
6answers
10k views

### How can this confetti code be improved to include shadows and gravity?

Here's some confetti: ...
3answers
2k views

### Automatically generating a dependency graph of an arbitrary Mathematica function?

Has anyone written a function to pull the function dependencies of a function? That is, it would be nice to have a function that returns a list of function dependencies as a set of rules, terminating ...
9answers
2k views

### Levels: how do they work?

I cannot understand how Mathematica manages levels, and so it's always a painful try-and-fail to use Flatten. Can someone please give me a very clear definition? ...
4answers
2k views

### Compiling more functions that don't call MainEvaluate

I would like to use Compile with functions defined outside Compile. For example if I have the two basic functions ...
4answers
5k views

### How to change the default ColorData used in Mathematica's Plot?

This question leads on from the recent question What are the standard colors for plots in Mathematica? There it was determined that the default color palette used by ...
1answer
1k views

### Incompatible Changes since Mathematica Version 7?

There is documentation of the incompatible changes made to Mathematica with each major release: Incompatible Changes since Mathematica Version 1 Unfortunately that documentation simply stopped ...
6answers
2k views

### How to plot ternary density plots?

How can I get a ternary density plot just like the plots from OriginLab? ContourPlot and DensityPlot seemingly can accept the ...

15 30 50 per page