Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 91

Questions on writing non-trivial programs in Mathematica. Do not use this tag for questions on plotting/graphics or for questions on doing mathematics with Mathematica, where the focus is more on the math than the program.

7
votes
The answer depends on the structure of the algebra. I therefore cannot give a universal answer. Instead, I will illustrate the structural dependence by means of examples. In response to the request …
modified Jan 31 '17 by LCarvalho
2
votes
When each $v_i = (v_{i,1}, v_{i,2}, \ldots, v_{i,k})$ is a $k$-vector we may interchange the summations to obtain $$\sum_{i=1}^{n-t} v_i\cdot v_{i+t} = \sum_{j=1}^k\sum_{i=1}^{n-t} v_{i,j} v_{i+t,j}, …
modified Mar 28 '13 by whuber
18
votes
After an initial attempt with a Graphics-based solution, it became apparent that raster-based solutions would be far more efficient. Methods based on ArrayPlot work nicely, but I wondered whether ima …
modified Mar 26 '13 by whuber
44
votes
Obtain the image: i = Import["http://i.stack.imgur.com/iab6u.png"]; Compute the distance transform: k = DistanceTransform[ColorNegate[i]] // ImageAdjust; ReliefPlot[Reverse@ImageData[k]] (* To ill …
modified Mar 5 '13 by whuber
17
votes
Cormullion's solution, which invokes built-in procedures MinDetect and MaxDetect, can be made to work in earlier versions of Mathematica than 9.0 using identically named (but differently functional) p …
modified Feb 19 '13 by Community
15
votes
We can substantially speed up the calculation for large primes by making some elementary observations about the Fibonacci series. There are two motivating ideas behind them: Almost all the propertie …
modified Jan 29 '13 by whuber
9
votes
Represent the solution as a list $\{z_0, z_1, \ldots, z_9\}$. The counts of appearances of the various digits can be computed as appearanceCount[n_Integer, i_Integer, b_: 10] := Count[IntegerDigits[ …
modified Jan 7 '13 by whuber
8
votes
The question invites us to perform the computation in steps: the presence of Range[20] suggests--and indeed truly involves--20 loops. Each loop effectively computes the least common multiple (lcm) of …
modified Nov 9 '12 by whuber
15
votes
If you want to be really nasty, traverse the entire graph (trying various vertices as starting points) and restrict the search for a shortest path to the traverse tree. Some of these will be quite lo …
modified Apr 10 '12 by whuber