3
votes
4answers
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 ...
0
votes
1answer
349 views

singularity in NDSolve and Table command [closed]

We are considering the following equations ...
11
votes
2answers
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, ...
3
votes
2answers
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 ...
1
vote
1answer
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 ...
4
votes
1answer
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: ...
2
votes
2answers
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 ...
17
votes
4answers
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 ...
2
votes
1answer
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 ...
19
votes
2answers
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 ...
3
votes
2answers
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 ...
5
votes
2answers
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 ...
1
vote
1answer
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 ...
11
votes
6answers
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 ...
12
votes
3answers
701 views

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

Consider the following code: ...
7
votes
0answers
368 views

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

Using Palettes -> Writing Assistant -> Math Cells, you can enter aligned equations such as: ...
4
votes
2answers
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 ...
4
votes
2answers
148 views

Confusing ReplaceRepeated & Hold

I've been bootstrapping myself to the very alien world of Mathematica and there came my first WTF moment: ...
29
votes
5answers
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 ...
2
votes
1answer
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 ...
-1
votes
1answer
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: ...
1
vote
2answers
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 ...
3
votes
1answer
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?
1
vote
1answer
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: ...
0
votes
0answers
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 ...
3
votes
1answer
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++. ...
17
votes
1answer
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 ...
14
votes
1answer
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 ...
2
votes
1answer
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 ...
9
votes
2answers
853 views

Using J/Link to decode Google Maps Polyline strings

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 ...
12
votes
2answers
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 ...
2
votes
1answer
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 ...
1
vote
2answers
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 ...
9
votes
1answer
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 ...
4
votes
2answers
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" ...
2
votes
2answers
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: ...
5
votes
1answer
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: ...
9
votes
1answer
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, ...
26
votes
7answers
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 ...
5
votes
3answers
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: ...
4
votes
0answers
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 ...
6
votes
2answers
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 ...
4
votes
1answer
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: ...
3
votes
1answer
422 views

Second Order Non Linear Differential Equation

I'm trying to solve the following differential equation numerically: ...
2
votes
2answers
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 ...
5
votes
0answers
89 views

Download binary file bypassing Import/Export? [duplicate]

Possible Duplicate: Downloading files without using Import While attempting to answer my own question I realized that I don't know a way to simply download a binary file to a specified ...
13
votes
1answer
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. ...
3
votes
1answer
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 ...
0
votes
1answer
233 views

FindRoot on a 2D list of Equations

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 ...
7
votes
3answers
390 views

How to Gather a list with some elements considered unique

I have a list of the form: list={{0,...},{1,...},{1,...},{0,...},{3,...},{3,...},{0,...},{0,...},{5,...},{5,...},{5,...},{0,...},{5,...},{0,...},...} So when we ...

15 30 50 per page