Reputation
51,149
Next tag badge:
250/100 score
19/20 answers
Badges
6 80 199
Newest
 Nice Answer
Impact
~680k people reached

2d
comment Improve simulation speed using Compile
@user64620, More generally, I find it useful to have the Mathematica code closely reflect the compiled instructions, so that I can understand better what the compiler is doing. Sometimes you can spot optimisations more easily that way. Though as Oleksandr pointed out, it makes little difference for this problem since all the time is spent doing the dot products.
2d
comment Improve simulation speed using Compile
@user64620, I needed to use an explicit loop so that I could compute the trace at each step. Since Compile translates NestList into a procedural loop anyway (as you can see from the CompilePrint output), there's nothing to lose from writing it that way.
2d
comment Forcing a locator button to remain on the surface of a sphere
Related: 5802
May
19
comment What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools)
I've only just seen this - awesome! It's really good to have something like this built in, many thanks.
May
15
comment Do not like quality of graphics when exported by Mathematica 9
and have you tried using EdgeForm[] in the graphics expression?
May
15
comment Do not like quality of graphics when exported by Mathematica 9
Are you using the default style sheet in Mathematica 9?
May
12
comment Different FourierParameters in each dimension for discrete Fourier transform
Maybe f[h_] := RotateRight@Reverse@Fourier[h, FourierParameters -> {1, -1}]
May
11
comment CompiledFunctionCall vs. LibraryFunction
@MariusLadegårdMeyer, in your question you are defining compBinomial to take real arguments but when you call it from within compsum you pass integer arguments. I think this type inconsistency is why the library function is not used.
May
10
comment Why does partitioning increase Dot execution speed?
I think with symbolic matrices you are just seeing an exponential increase in complexity with the number of matrices in the dot product - the timing is about the same for partitions of n and 24/n. The optimum partition size is probably around Sqrt[n].
May
9
comment Does Mathematica store hidden information for matrix objects?
A simple workaround is to create a new expression, e.g. AntihermitianMatrixQ[2 M / 2] or AntihermitianMatrixQ[0.0 + M]
May
6
comment Export Text with Colors
@d555, no I'm using Windows. Looks like you have a Mac specific bug...
May
6
comment Divide each element of a list of 500 matrices by another matrix
You have misremembered - automatic Listable threading works on the outermost dimension. In your example both lists are length 3 so it threads in all Mathematica versions.
May
6
comment Export Text with Colors
RTF format might be a good choice for opening in Word
May
6
comment Divide each element of a list of 500 matrices by another matrix
As kguler commented, why not just use M/div ?
May
6
comment Is there a good reason for the removal of this FrameTicks syntax?
@Mr.Wizard, I don't recall seeing any problem with Frame and FrameStyle using the flat list syntax.
May
5
comment What particular situation do we have to use RuleDelayed after replacement?
As your own testing confirms, you can use either Rule or RuleDelayed in that particular case.
May
5
comment Why don't we use SetDelayed when we use placeholder to declare a function?
As well as the answers to the duplicate question, you may want to read chapter 4 of Leonid Shifrin's online book
May
4
comment Removing solutions which are particular cases of others
I don't think there's anything built in to do it. It's probably not too hard to implement something but you'll need to supply a few example cases for people to test their ideas with.
May
3
comment Counting variable from a list of matrices
@HuShu, it uses Associations which are new in version 10. Perhaps you are using an older version?
May
3
comment Axis label shifted in 3D plot
Please include the code that generates the plot. It's notoriously difficult to debug code via telepathy.