# All Questions

119 views

### Where are the functional programming constructs: every and some? [duplicate]

Coming from other functional programming environments (e.g., Clojure) I've become accustomed to some functions that I haven't found equivalents for in Mathematica yet. The two I reached for last ...
152 views

...
234 views

### How to Flatten Array of Arrays of the highest order in a simple way?

I have a matrix of matrices, given in the following code. I want to flatten the array... ...
229 views

### Why does Mathematica stop when run in the background in command line mode?

If I try to start a Mathematica script in the background from the command line, like this: math -script someFile.m & then the process gets automatically ...
170 views

362 views

### Invert Colors Stylesheet White on Black

There have been a couple studies done that showed that white text on a black background increase recall of data. Although this is certainly debatable how might I invert the colors of Notebook font ...
183 views

### Nonlinear Optimization with conditional statement

I find Maximize doesn't work well under conditional statement. Here is an example. A car is driving up a slope. I want to find out the largest slope angle the car can drive upwards. I choose the ...
402 views

### Interpolating data with a step

Suppose I have some data with a step in it: data = {{1, 1}, {2, 2}, {3, 3}, {3, 4}, {4, 5}, {5, 6}}; Interpolation will complain about this and not give you an ...
1k views

### Too much whitespace in a GraphicsGrid containing Legended Plots

Where is all the vertical whitespace coming from, and how do I get rid of it? ...
160 views

### Manipulate Locator warping (snap to cursor)

I'm looking to have a Manipulator Locator that moves in discrete steps and requies the user to click on/near the locator position.. consider these two examples: ...
137 views

### NDSolve finding solution when it shouldn't

NDSolve in mathematica drives me crazy and I'm seriously thinking about switching to Matlab because of strange bugs I run into. ...
373 views

### Concise way to generate multiset lists

I wrote the following to generate a multiset with the same number of items over a fixed range: ConstantArray[#, 3]& /@ Range[9] // Flatten ...
82 views

### Plot with non-standard domain

I have data {x, y} where x starts at -25 degrees and goes up to +25 degrees in 1 degree steps, and then comes back down to -25 degrees in 1 degree steps again. I ...
361 views

### Finding a point from a set of contours such that it is nearest to a given point

I have several contour lines and one point. How can I find a point in one of those contour lines which is nearest to the given point? ...
989 views

### Q-Function representation in Mathematica

I observed that there is no Q-function representation in Mathematica. The definition of Q-Function is: \begin{align} Q(x) &= \frac{1}{\sqrt{2\pi}} \int_x^\infty e^{-\frac{u^2}{2}}du \\ ...
103 views

### How to use ProbabilityDistribution for a posterior expression [duplicate]

I am performing a Bayesian updating on a Lognormal prior. After combining the prior and likelihood and dividing by the normalization constant I get the following expression as the posterior: ...
137 views

### bulk initialization of associative array/hash implemented with function pattern matching?

I see that we can do associative arrays in Mathematica using functions that have implicit pattern arguments, as in ...
144 views

### Convolution of a denstity function having a point mass with itself

My density function is as follows: ...
37 views

### Use Output as Input [duplicate]

I have this function which as a result returns a point ...