Reputation
28,955
Next tag badge:
86/100 score
34/20 answers
Badges
1 39 98
Impact
~276k people reached

Apr
12
revised How to switch from array to string?
added 279 characters in body
Apr
12
revised How to switch from array to string?
deleted 7 characters in body
Apr
12
answered How to switch from array to string?
Apr
12
comment Function in Mathematica 10.1, but not in CDF Player 10.0.2
But I have been using a function of that name for many years That is one of the reason why one should not define user level functions that starts with UpperCase !
Apr
12
comment Create an array with certain conditions and use it to fill a matrix
Are we talking about this part: (2*math.pi*k*sigma/L)*(2*math.pi*k*sigma/L) ? Is this not the same as (2*math.pi*k*sigma/L)^2? This is what I mean. As for the table command index, yes, I see you have it going to int(n/2+1) and I used n so you just need to change the index. to one that corresponds to rounding n/2 and adding 1 to it. See help on Round, Ceiling, Floor etc..
Apr
12
comment Create an array with certain conditions and use it to fill a matrix
You should not be translating code as is from Python to M. You should try to translate the algorithm itself if possible. Many operations in M can be done with one or 2 lines, instead of using For and so on. M is functional programming language, while Python is procedural build in an OO framework (like Java is).
Apr
12
comment Animator not always working under 10.0/1
I think there was such an error, I saw it on one or 2 of my demos. But now it is gone, at least I tried your code in 10.1 and it works with no problem on my windows 7. But the error message you show, I've seen before and even reported it. I had no idea why it came from. Code used to work ok before 10, and then on some demos I saw the above message.
Apr
12
comment Create an array with certain conditions and use it to fill a matrix
You mean you want to translate power_spectrum_k = np.zeros(n, float) to Mathematica? I would use Table command, as in Table[0,{n}], for the whole thing, may be n=10; Table[Exp[-(2 Pi k w/L0)^2], {n}] ps. why not use ^2 instead of writing the same expression 2 times?
Apr
12
comment Calculating functions of sounds
@belisarius thanks for the link. I had no idea human can make sound with such low frequency.
Apr
11
revised Calculating functions of sounds
added 240 characters in body
Apr
11
answered Calculating functions of sounds
Apr
11
answered Simplify the imaginary part
Apr
11
revised How to make a 3D plot of $(x^2+y^2-1)^2+(y^2+z^2-1)^2+(x^2+z^2-1)^2=0$
added 221 characters in body
Apr
11
comment How to make a 3D plot of $(x^2+y^2-1)^2+(y^2+z^2-1)^2+(x^2+z^2-1)^2=0$
@UnitedKingdom I updated the answer for your comment reply
Apr
11
answered How to make a 3D plot of $(x^2+y^2-1)^2+(y^2+z^2-1)^2+(x^2+z^2-1)^2=0$
Apr
10
answered Elegant functional equivalent to a nested loop?
Apr
10
answered How to draw a Circle in 3D on a sphere
Apr
10
comment How could I speed up a code including a Module with many functions
Yes, Wolfram workbench has a profiler. Just checked. So this is something you can try. profiler
Apr
10
comment Why does a comma insert a line break in a comment?
yes, turning off line breaking, will make big mess of the code formatting? is it like writing in a code cell basically, instead of input cell. I think. Never tried it. But the second option you show is not really practical. Having to keep pressing ESCnbsESC each time one wants to make a , or ;. These are comments, and they should just be written freely and as is. This problem should be fixed at the source by WRI.
Apr
10
comment How could I speed up a code including a Module with many functions
some tips are here 10-tips-for-writing-fast-mathematica-code it is too bad that M does not have a profiler build into it like Matlab does. May be the Wolfram workbech does, I do not use that.