# All Questions

96 views

### How do I test for the occurrence of an error message and act on it?

I want to see how well some curves fit a data set. If a curve doesn't fit after 100 iterations, I get the error cvmit. How do I test for and handle this error ...
158 views

### Combining the items with common available dates from two lists [duplicate]

I have two lists of data including dates such as data1 = {{{yy, mm, dd}, a}, ...} data2 = {{{yy, mm, dd}, A}, ...} There are some missing dates from each list, ...
357 views

### Finding a fixed vector which minimizes the pairwise distance between noisy elements in two unordered arrays

Let $A$ and $B$ be two sets of $d$-dimensional coordinates of comparible (though not necessarily equal length). For example, here we can set $d = 3$ and have normalized values like: ...
224 views

### WeatherData for the 15th day of each month

Suppose we have WeatherData["Helsinki", "MeanTemperature", {{2007, 1, 1}, {2012, 12, 31}, "Day"}] How we can have data just for 15th day of each month?
197 views

### Is it possible to use Find with wild cards?

When making global changes to code and variables Find is a great resource. Is there a way to use Find with wild cards to find and replace any non numerical elements or to find and replace only ...
1k views

### Sum over all permutations

I have n variables and a function that has all of them as variables. n-3 of them in terms of the entries of two lists. The possible entries in the lists $\alpha$ and $\beta$ range from {2,...n-2}. Now ...
243 views

### Optimal image quality using Rasterize Function

Based on previous posts about plotting two y axes on the same x axis, I wrote this function: ...
701 views

### How can I find the range of my function

I am trying to find the range of (3 Sin[x] - 3)/(2 Cos[x] + 10), I tried this, ...
263 views

### Using MatrixPlot, how can I dynamically zoom in and out with my mouse? [duplicate]

I have a MatrixPlot output which I would like to zoom around in, drawing boxes that define a zoom region with my mouse. These things are all fairly standard in Labview... surely Mathematica must have ...
2k views

### Complex valued 2+1D PDE Schrödinger equation, numerical method for NDSolve?

Based on the heat equation of the Mathematica Manual tutorial, I wrote the complex counterpart (Schrödinger) equation, for the free particle propagation of an initial wavepacket. ...
544 views

### Convert Mathematica formula to TeX (MathJax) with color

Case1: formula generated by functions. ...
136 views

### What are the scoping rules for function parameters shadowing System` symbols?

Here are some very contrived code snippets, highly unlikely to appear in real code, but still I am curious why they behave like this: ...
117 views

### Speeding up 2D histogram plotting (perhaps via ListDensityPlot)?

What would be the fastest way to take an array containing about $n=10^6$ to $10^7$ elements and plot a two-dimensional histogram with A x B bins? ListDensityPlot is taking upwards of half-an-hour. ...
84 views

...
185 views

### CMYK colours in a graph template

Hi I'm trying to put together a graphing template. Unfortunately, my arrowheads are a different colour than my functions when the graph is exported to something like a PDF. Is there a way I can ...
2k views

### Minimization by Nelder-Mead

Finding a global minimum for this problem (non-linear optimization by the Nelder-Mead downhill simplex method) may not be possible, but by finding local minimum, I am expecting the value of the ...
225 views

### Bincounting a list

I'm a Mathematica novice here. I'm trying to execute the following code to add random 1's into a zero matrix, repeat this many times, and then bin/histogram the number of nearest neighbor 1s. Can ...
137 views

### Whats is the real difference between this two examples of using Dynamic with Grid

the question is relatively simple I think. This is the first example of the code which works: ...
111 views

### Exiting FindMinimum when a condition is met

I want to determine if a function f[x] can take negative values. f is expensive to compute and ...
308 views

### Calculating difference ratios (Δβ/Δρ) from a data set

I am little bit confused about how to calculate δβ/δρ value if I have set of values like this. I have the values of β and ρ like this. ...
189 views

...
189 views

### The guidelines for options or multiple arguments?

Where can I find some references concerning when to use options and when to use multiple arguments in designing and writing functions? Seems most built-in functions have arguments less than 3 and ...
50 views

### Ignoring Indeterminate Results [duplicate]

I am doing some program where I must calculate some numerical integral (the involved function is quite complicated to be solved analytically). The function to be integrated have some parameters which ...
188 views

### Make second argument same as first when only one argument passed to function [duplicate]

Clear[f] f[n_, k_: n] :={n, k} f[x] {x,n} Actually I would like to get: {x,x} The following is one wrong definition, I'm showing that I need the ...
163 views

### Is it possible to use some short form in Postfix

example 1 we can use Information , but can not use ? Sin // Information Sin // ? ...
690 views

### Nonlinear least squares on a GPU with Mathematica 9

Update: A Mathematica wrapper for (https://github.com/zitmen/cuLM) should allow for us to directly implement the Levenberg-Marquardt algorithm in CUDA for nonlinear least squares fitting. In a ...
167 views

### Plotting data with ListPlot where the coloration of the data depends on its position in an array?

Imagine I have some data in a list I'd like to plot using ListPlot in Mathematica 9, for example: ...
82 views

### Make all new cells have a specific style as a function of the Mathematica installation

I would like all new input and output cells, in fact all new cells including section headers and such, to have a specific stylistic property (...
562 views

### Problem with plotting a function with NIntegrate

Why does the following Plot3D command never terminate? ...
401 views

### ListPlot coloring by density of points

I have a set of points on a circumference: points = Map[Normalize, RandomReal[{-1, 1}, {3000, 2}]] And I want to plot them and color the plot according to the ...
382 views

### Implementing a 100% Mathematica http server

I would like to dedicate a small machine to exclusively running a Mathematica kernel and use that kernel to read http requests arriving on port 80, treat them and send http responses back without any ...
2k views

### Is it possible to style multiple Plot or ListPlot curves using a color gradient?

I am using Mathematica 8. In Mathematica, there is a default PlotStyle coloring in Plot and ...
164 views

### HTML documentation build issue with Wolfram Workbench 2 and MMA 9

Using the Wolfram Workbench 2 (and Mathematica 9) to build HTML documentation for a package I am developing, I am ending up with HTML pages that contain a lot of text elements that look like this: ...
240 views

### Adding Dynamic functionality to a Graph

I would like to make the edges and vertices of a Graph interactive, a simple demonstration is to change their colors: ...
142 views

### Plotting three-dimensional plot with Interpolating functions

I want to plot my functions, but I can't seem to figure out what's going wrong. I want to be able to animate it as well. ...
259 views

### Generate regularly spaced points from the surface of simplexes

I need to generate regularly spaced samples (points) from the surface of unit simplexes with 2 or greater vertices or end points. I can generate random samples pretty straightforwardly: ...
286 views

### Series expansion for small ratio of variables

I have a messy expression of variables that I would like to simplify under the assumption that certain ratios of the variables are small. For example, consider $\sqrt{x+y}\;$ expanded for small ...
532 views

### How do I draw a credible velocity vs. time graph using Locators?

This is partly a math question, partly a Mathematica question. For educational purposes, I'm making a simple demonstration to create a velocity over time graph from six locators. On the basis of ...
222 views

### How can the evaluation queue be aborted?

While developing, I would sometimes like to stop evaluation of selected cells at a certain point. The following example nearly seems to work, but repeated runs of ...
174 views

### DynamicModule variables that retain values during code reloading

At times I'll find myself building a some interface component where I want to have some localized dynamic variables, and while testing I might realize that some bit of the code needs to change, which ...
426 views

### Cissoid of Diocles not smooth plotted by ContourPlot

Table[ContourPlot[y^2 (10-x)==x^3,{x,0,.1},{y,-.1,.1},PlotPoints->5],{k,1,150,10}] How to get the smooth graph? When ...
3k views

### Elegant way of obtaining the envelope of oscillating function [duplicate]

I am solving a differential equation numerically and the output is an oscillating function with the amplitude of the oscillation decaying in time. I would like to extract the power law governing this ...
404 views

### Adding noise to nonlinear control system using NDSolve

I have a nonlinear control system ...
1k views

### Elegant and fast way to join all string sequences

I want to do what title says: {"a","b",1,2,3,4,"a",2,2,2,"edg","?"} => {"ab",1,2,3,4,"a",2,2,2,"edg?"} in the most elegant way. For example one replacement rule for ...
113 views

### Why does saved graphic not look the same as graphic in notebook?

g1 = Plot[(x^2 - 4 x + 3)/(x + 1), {x, -5, 5}]; Rotate[g1, -90 Degree] After saving the output of the rotated graph, I still get the graph of ...
927 views

### Exporting a sequence of graphs as video efficiently

I have a sequence of graphs that are being created within Mathematica which I'm exporting to create an animated plot of the graph, as follows. ...
838 views

### Import Spreadsheet Data and DeleteCases of empty cells &/or choosing a Range to import

I am importing Excel spreadsheet data into Mathematica. Here is what the data looks like, notice the cell Q1 with "sdf": I import this data by specifying the Spreadsheet location, sheet name, top ...
439 views

### Creating a highly customized BarChart

I am trying to create a BarChart visualization for multi-step data filtering. Think of a traditional sales funnel: many leads, fewer prospects, few customers, very few return customers. The only ...
I have two lists of $d$-dimensional coordinates, for example setting $d=3$ we might write: ...