# All Questions

519 views

### Faster code for specific problem

Sorry, but I need the following code much faster and I'm running out of ideas. I do appreciate any help. I post two of my fastest ideas (tab and mat), although they are not really fast. Thanks in ...
349 views

### singularity in NDSolve and Table command [closed]

We are considering the following equations ...
266 views

### Package found with Needs, but not with ParallelNeeds

I want to use a self-written package in a parallel computation. However while Needs["mypackage"] works without problems, ...
3k views

### Integral equation numerical solution with NDSolve

I'm trying to solve something like: f[x] == Integrate[f[x]*g[x]] where g[x] is known and ...
301 views

### How to change the values dynamically in a grid

I am trying to write a function which creates a Grid which has no value in the starting and when some value is passed to it, it should show that value in that ...
1k views

### NonlinearModelFit::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations

I have got a problem in my program with NonlinearModelFit: ...
424 views

### Total Variation Distance of probability matrix

How can I calculate the Total Variation Distance of a transition Matrix? is there any built in function? I've searched all documentation and haven;t found anything. ** More information: Let me try ...
2k views

### Spherical density plot of data set

I have a somewhat large number of 3-dimensional unit vectors ( ~ 100 000 unit vectors), and I am trying to visualize their distribution. First thing I tried was ...
530 views

### Linear Solve with Modular Arithmetic

I am interested in using LinearSolve[m,b] which will find a solution to the equation $m.x=b$, where I am in mod 2 arithmetic. Is there any way to perform this ...
746 views

### What are some advanced uses for Block?

I read the answer to this question and this one. According to those, Block is safer (if something aborts, it restores the values) and faster (perhaps something to ...
244 views

### LetL and Module efficiency

I was recently introduced to the LetL macro thanks to Leonid's answer to one of my prior questions. I was, needless to say, impressed by the simplicity of its ...
150 views

### How to silence all messages associated with a built-in symbol?

The post title's pretty much says it all... The reminder of this post just describes the little headway I made with this problem, FWIW. One would hope that ...
262 views

### Manipulate indexed Interpolating Functions

MWE I have some data indexed by gamma. For each gamma I want to find the intersection points of two lists and plot the lists ...
511 views

### Overlapping Red and Green ArrayPlots to show yellow intersections

Let's say I have two ArrayPlot[]s. One is in redscale and the other is in greenscale, such that the lowest value is white and the highest value is pure red or ...
701 views

### How to get 2D graphics into 3D without background?

Consider the following code: ...
368 views

### How can I export aligned equations to $\LaTeX$?

Using Palettes -> Writing Assistant -> Math Cells, you can enter aligned equations such as: ...
238 views

### Transform x-scale of data for e.g. MatrixPlot

I have to transform in a nonlinear way the x-scale of some data for a MatrixPlot (or ReliefImage or ...
148 views

### Confusing ReplaceRepeated & Hold

I've been bootstrapping myself to the very alien world of Mathematica and there came my first WTF moment: ...
6k views

### Custom arrow shaft

Inspired by Sjoerd C. de Vries' nice answer to this question, and the desire to pimp a Graph I did with Mathematica recently I would like to know if there are ways to customize the arrow's shaft ...
189 views

### Numerical comparisons of matrices

I have a matrix which should be equal to a null matrix. However due to the numerical precision, a brutal equality test with a matrix initialized with zeros does not work. How should I perform the ...
680 views

### Help to solve Simultaneous Equations

I think this should be easy to numerically solve in Mathematica, but for some reason I'm not finding the correct way to do it. I basically want to solve these simyltaneous equiations: ...
102 views

### NSum generates a warning message when getting the sum of a list

I know what I'm doing can be done with Total: a = Range@3; Total@a And if I simply choose ...
689 views

### stationary distribution of a transition matrix

How can I solve the stationary distribution of a finite Markov Chain? In other words, how can I estimate the eigenvectors of a transition matrix?
412 views

### How do I make my discrete plot thicker?

I am making a discrete plot and a regular function plot together. But my curve is so thick that for color-blind people, it's pretty much impossible to see the black dots of my discrete plot: ...
93 views

### Good Introduction / Tutorial to Mathematica **Books** [duplicate]

Possible Duplicate: Where can I find examples of good Mathematica programming practice? I'm a high school senior and am using Mathematica for a research project. However, I find it a bit ...
107 views

### How to give ClusteringComponents initial values?

I came across a variant of k-means that adds a algorithm to select good starting values called k-means++. ...
2k views

### Vectorizing an image like “Trace Bitmap” in Inkscape

Lately, we had a nice question about artistic image vectorization which got very nice answers. As Szabolcs pointed out himself Since "true" vectorization performed by various specialized software ...
505 views

### Simulating Stochastic Processes the MMA way

This question is really a specific problem and a methodological one concerning MMA best practices. I want to simulate a system of stochastic processes. If this were a geometric Brownian motion or ...
197 views

### Getting the 557th element of a table

Make a table with elements $\sin(\sqrt{8 n}/4) + r\,$for $n$ from $1$ to $1000$, where $r$ is a random real number between $-0.1$ and $0.1$ that is different for each value of $n$. Also make a ...
853 views

I would like to use this java code inside Mathematica using J/Link. It converts Google Maps API Encoded Polylines to a list of points. I tried the Mathematica tutorial but got lost. There is the Java ...
450 views

### Proper Filling of Self-Intersecting Polygon

I have a spiral pattern that I would like to fill, which self-intersects. My desired behavior is to have filling between neighboring lines only, and to represent this figure as a single polygon. The ...
428 views

### How draw dynamic empty rectangle over a bitmap?

I am trying to make a cookie cutter that will extract a small square from a much larger bitmap with a click of the mouse. The LocatorPane appears to be a useful way ...
236 views

### Saving graphics object in order to manipulate it later?

I've generated a bunch of graphics using ContourPlot wich, given the nature of my problem, take a long time to create, and I was wondering if there is a way to save ...
329 views

### BUGS-type calculations in Mathematica

Recently I have been teaching myself how to Bayesian calculations with the BUGS language (JAGS, in particular). However, I find myself wondering how one might use Mathematica to do similar ...
427 views

### Split string into sub-strings of length n [duplicate]

Possible Duplicate: Partition string into chunks How can I split a string into sub strings of length n? For example I have a string "ABCDEabcde1234" ...
511 views

### Superscript prime symbol

x\[Prime] looks like $x_'$, ugly right? Is there a way to make a symbol with prime to look like $x'$? That's what I'm trying right now: ...
1k views

### Mathematica won't give eigenvectors but Wolfram Alpha will? What am I doing wrong?

If I ask Mathematica to find the eigenvectors and eigenvalues of the matrix: ...
197 views

### Ranking Function Allowing for Ties

I have a list that I need to be able to assign ranks to individual elements in, giving it a number related to its position if the list were to be sorted, allowing for ties. For example, ...
1k views

### ColorData[“VisibleSpectrum”] is wrong?

I am trying to visualize the visible spectrum using the built-in ColorData["VisibleSpectrum"] function which "colors based on light wavelength in nanometers". But I ...
147 views

### Metaquestion: how to find out why (e.g.) MatchQ[42, _?Function[x, True]] is False?

Suppose you run into a bewildering Mathematica result (which happens to me several times per Mathematica session, even after a 20-year acquaintance), such as, for example: ...
128 views

### Getting EPS imports to respect the original fill rule

One major problem in my attempt to answer to the CountryData flags question is that the way Mathematica handles filled curves differs from the way SVG and EPS style editors do. The latter two have the ...
495 views

### Web scraping and multi-threading in Mathematica

I'm working in some web scraping using Mathematica, and today, to speed-up the process, I used bash commands (xargs with parallel options with curl and wget) using ...
469 views

### RevolutionPlot3D of 4 piecewise functions around X-axis crashing mathematica

I'm trying to rotate 4 piecewise functions around the X-axis using RevolutionPlot3D. The 4 functions I have are: ...
422 views

### Second Order Non Linear Differential Equation

I'm trying to solve the following differential equation numerically: ...
117 views

### Recursion doesn't happen any more or doesn't happen correctly if I store the recursive relationship in a variable first

I know the following code will form a recursion: Clear["Global*"] u[i_, n_] := u[i - 1, n] + u[i, n - 1] u[0, n_] := n u[i_, 0] := i u[2, 2] (* => 8 *) But ...
89 views

354 views

### Transform an expression into a graph that can be plotted with TreeGraph (not TreeForm)

I would like to plot an expression (like TreeForm does), but using the new TreeGraph functionality. ...
396 views

### How can I forecast time series data with cellular automata?

I have a time series data, for example data = FinancialData["JK:ADRO", "July 16 2012"] Can I use CellularAutomaton to ...
I have a $n \times k$ Matrix of data that I want to feed into an equation and solve for an unknown variable. I suppose I can always just convert the Matrix into a long Array but I'd like to learn how ...