Simon Woods
Reputation
59,928
227/100 score
 Apr 9 comment Output lists with new line for each record element Look up Column Apr 8 awarded Enlightened Apr 8 awarded Nice Answer Apr 7 answered Simulating a “Coin Tossing” Game Apr 7 comment Optimization for iterating and plotting a matrix product and its elements? Regarding numerical precision - when you use Compile you are always using machine precision. Outside of compiled code you can use exact arithmetic or arbitrary precision (see the tutorial tutorial/ArbitraryPrecisionNumbers for example), but it will be much slower. Apr 7 comment Optimization for iterating and plotting a matrix product and its elements? The square rooted term in the function appears 3 times and is quite complicated. It will be faster if you compute it just once like you do with t. Other than that I can't see any obvious optimisations. Apr 6 comment Optimization for iterating and plotting a matrix product and its elements? Maybe you can use some simpler, shorter functions to make a working example. It's really hard to optimise code just by looking at it - people really need something they can paste into Mathematica and play with. BTW you can use Dot for matrix multiplication. Apr 6 answered how to convert a bundle of if statements into a simple one. Apr 6 comment Optimization for iterating and plotting a matrix product and its elements? Your posted code includes symbols o,A,C,D in the complied function, but they are not defined anywhere. You should avoid using C and D anyway as they are built-in functions. Apr 6 awarded Nice Answer Apr 4 comment Importing .AVI to mathematica and frame extraction In the documentation example is it exporting the movie okay, but failing to import it? Apr 4 awarded Enlightened Apr 4 awarded Nice Answer Apr 3 comment How to divide the wine into two equal portions @iFikr I added the animation code. Apr 3 revised How to divide the wine into two equal portions added animation code due to popular demand Apr 3 comment How can one get all possible sublists of a list? @MartinBüttner, regarding the linked question RunnyKine's answer here gives four empty lists if you remove the Union bit. Apr 3 answered How can one get all possible sublists of a list? Mar 31 reviewed Close How can I solve a Hamiltonian with numerical methods? Mar 31 reviewed Close How do I add a finite value to one component of a set of vectors Mar 31 reviewed Close Solving simple transcendental equation