46,814 reputation
674185
bio website
location
age
visits member for 2 years, 10 months
seen 4 mins ago

14h
comment I define a variable as local to a module BUT then the module uses its global value! Why?
@Leonid, I was using the SE app on my phone and it hadn't updated to show your comments so my reply to Mr Wizard appears to be ignoring or disagreeing with you! I do see what you mean, Set and Rule are scoping constructs so the behaviour is consistent (though arguably undesirable), which is what I thought originally. I hope you manage to find time to write down that list of rules - it's a shame the official documentation doesn't go into the level of detail that you do in your contributions here.
15h
awarded  Enlightened
15h
awarded  Nice Answer
15h
answered What is the simplest way to plot x^(1/3) on the interval [-3,3]?
1d
comment I define a variable as local to a module BUT then the module uses its global value! Why?
The StrictLexicalScoping option looks useful, though I wish it were implemented as a StrictLexicalModule function rather than a system option.
1d
comment I define a variable as local to a module BUT then the module uses its global value! Why?
Makes perfect sense, I hadn't properly appreciated the real issue here, that the renaming exemption should not apply to unheld constructs.
2d
comment I define a variable as local to a module BUT then the module uses its global value! Why?
Isn't it another example of this? Using Module[{a, h}, Set @@ {a[h_], h^2}; a[4]] avoids the problem by "hiding" the inner scoping construct from Module
2d
answered Assigning new value in association
2d
comment Problem with FindRoot applied to functions
Have you tried using a pattern which matches a vector of numeric values? rV_/;VectorQ[rV, NumericQ]
2d
answered Graphics3D: Objects with holes
Jan
27
answered accessing elements of nested list
Jan
27
comment accessing elements of nested list
@Mr.Wizard, this is close: mathematica.stackexchange.com/questions/63989/…
Jan
26
comment Maintain a function quality of an expression
If you check the documentation for Flatten, near the bottom there is a "See Also" section showing related functions. The first of these is Partition which is what you are looking for.
Jan
26
comment Maintain a function quality of an expression
You could just use OVector[n_] := Flatten[Oeff[n]]
Jan
23
answered For a given expression: if it appears, remove it, but if it is absent, add it
Jan
23
comment For a given expression: if it appears, remove it, but if it is absent, add it
I was just looking at something similar, but using a : Longest[(-Infinity | PatternSequence[])] as the head/tail patterns
Jan
22
comment How-to convert real number into List of its digits?
@user1989, No apology necessary! It's not a rule, just a good tactic to get the best out of the site :-)
Jan
22
comment population of dots with normal distribution of pitch
What is the "dot to dot" distance? The distance from a dot to its nearest neighbour or to all other dots?
Jan
22
comment How-to convert real number into List of its digits?
@user1989, no problem. By the way it is usual here to wait a while before accepting an answer, so as not to discourage others from posting other, potentially better, answers. 24 hours is good as it gives the whole globe a chance to contribute.
Jan
22
answered How-to convert real number into List of its digits?