14,197 reputation
23467
bio website
location
age
visits member for 2 years, 6 months
seen 16 hours ago

1d
comment Best practice to group and have your favorite custom functions available at startup
I suppose you are aware of init.m and are asking for the best way to organise your functions beyond that?
Jul
28
comment Sum with Levi-Civita
@Dave84 since you have explicit values for the $a,b,c$ you can use TensorProduct
Jul
28
comment Sum with Levi-Civita
It looks like LeviCivitaTensor, not LeviCivita. Also the code you give has syntax errors, and even if it didn't it doesn't work because a and so on aren't defined and when you try to retrieve their elements, you get an error. Not to put too fine a point on it, but you need to look at the docs.
Jul
28
comment Is there a function for nearest power of 2 in Mathematica like nextpow2 in MATLAB?
Ceiling[Log[2, #]] &
Jul
25
comment Ordering oscillators with negative powers: Infinite loops
Can't you try to isolate which rule is the problem? It seems unlikely that anybody will sit down and work it out from your mass of patterns! Try to put yourself in the answerer's position.
Jul
25
comment Ordering oscillators with negative powers: Infinite loops
Can you isolate and post the bit of code that results in an infinite loop? I don't see why normal ordering according to your prescription would result in an infinite loop.
Jul
23
comment Is there a way to recreate the typical Red/Blue-Postereffect using Mathematica?
@RahulNarain truth be told, I did try improving them and got bored after 20s. So I understand you (but I'll hold on to those sweet upvotes anyway)
Jul
23
revised Is there a way to recreate the typical Red/Blue-Postereffect using Mathematica?
added 42 characters in body
Jul
23
revised Error message: Coordinate index 0 is out of range for the enclosing GraphicsComplex
added data to question
Jul
23
comment Is there a way to recreate the typical Red/Blue-Postereffect using Mathematica?
@eldo the comment above was for you
Jul
23
comment Is there a way to recreate the typical Red/Blue-Postereffect using Mathematica?
complaints should be addressed to @RahulNarain who came up with the colours. I'm just here to collect the votes :)
Jul
23
answered Is there a way to recreate the typical Red/Blue-Postereffect using Mathematica?
Jul
23
comment Is there a way to recreate the typical Red/Blue-Postereffect using Mathematica?
Colorize[image, ColorFunction -> cfunc] is probably what you want, although coming up with the appropriate cfunc is the trick.
Jul
22
comment Is there a list of Octave functions mapped to the related Mathematica one?
@RunnyKine not baroque enough
Jul
22
comment Is there a list of Octave functions mapped to the related Mathematica one?
The 3rd alternative for ones is a bit like this function for obtaining $2^n$: powerof2[n_] := Length@ReplaceRepeated[{0}, (0 -> Sequence[0, 0]), MaxIterations -> n] // Quiet
Jul
22
comment Is there a list of Octave functions mapped to the related Mathematica one?
I understand; like I said, you might have better luck looking for matlab-mathematica tables. Also, a more direct translation of ones(n) probably would be ConstantArray[1, n]. However, that creates a list (or vector) of Integer entries, which means that if you try to do any arithmetic with it it will be done with exact numbers. This is much slower than with reals. This sort of booby traps are everywhere in mma.
Jul
22
comment Is there a list of Octave functions mapped to the related Mathematica one?
You might look for matlab-mathematica functions. But keep in mind that, as a language, mathematica is very different from matlab or octave.
Jul
22
comment Symbolic solution(s) to generalized Heat equation
@chris Yes that would be useful. Just like you can use mma now rather than carry around Gradshteyn-Ryzhik or Abramowitz-Stegun. Great idea.
Jul
22
comment Symbolic solution(s) to generalized Heat equation
Maybe because it's more of a mathematical problem than a Mathematica problem. I'm not sure how I'd go about finding analytical solutions with mma (but maybe someone else knows).
Jul
22
comment Get the last line from each of a large number of files, transform them, and write all results to a single new file
You can even make a palette! (OK I guess it won't work with hundreds of files, but self-promotion is self-promotion)