Reputation
136,309
Next tag badge:
146/100 score
19/20 answers
Badges
17 248 560
Impact
~1.5m people reached

13h
comment How to make multiple if statements?
You're right, I misremembered the wording of the question, thinking that this was merely one example of the general case of nested If. I guess I went in the wrong direction with my answer in that case. Ah well, hopefully it helps someone.
13h
comment How to make multiple if statements?
Would the Nearest method be similar to what Michael did here?: (30103)
13h
comment How to make multiple if statements?
Yes, I added it a couple of minutes after my initial post, and before my Interpolation addendum. Please don't feel the need to delete; sometimes a simple one-subject answer is clearer and preferred by the OP. I was just having some fun with it; my original answer was going to include meta-programming but about a minute before I would have posted kguler's pwF edit came up so I had to thing of something else useful to add. :-)
13h
comment How to make multiple if statements?
Not the question that was asked but a good treatment of a possible application. +1
13h
comment How to make multiple if statements?
beat you to it ;-p
13h
revised How to make multiple if statements?
added 845 characters in body
13h
answered How to make multiple if statements?
13h
comment How to make multiple if statements?
No problem; you've got my vote already. :-)
13h
comment How to make multiple if statements?
darn, you just preempted me with that edit...
14h
comment What does IndexBy do and how exactly does it work?
@rcollyer I'd have to play with it for a while to see what seemed best. That's probably as good as anything however. Possibly a catch-all formulation would end up cleaner looking. I'll try to return to this once I am running 10.1.
22h
revised Efficient way to sum all the primes below $N$ million in Mathematica
added 716 characters in body
23h
comment Sequence evaluation in an If statement
Okay, I shall close. I don't know if it's the same on Mathematics but here duplicates are rarely deleted, so yes, this post and its answers will remain linked from 3700.
1d
comment What is this syntax, [[1, 1, 2]]?
@zelliott Pickett linked to the documentation for Part in his first comment. For general resources one of our users compiled a huge list in answer to: (18).
1d
comment How do I create an array by applying a function to the index of each element?
Well covered. +1
1d
comment What is this syntax, [[1, 1, 2]]?
Although I have closed this question as "easily found in the documentation" I will be glad to point you to appropriate resources if you have additional questions about this; let me know in these comments.
1d
comment What is this syntax, [[1, 1, 2]]?
This is indeed a syntax for Part, which is a foundational operator in Mathematica. However Pickett is incorrect that those arguments "do nothing" as this is not a delayed assignment, therefore the right-hand-side Ndsol[[1, 1, 2]] is evaluated before the definition is made; this means that if the Symbols z, we etc. exist in that evaluated form they will be used in future evaluations of that function. See: (8829)
1d
comment How to disable differential styles/markers/etc. for multiple entities?
@mrc In 10.0.2 you can use {1, ## &[2, 3], 4} however it was reported to me that this does not work in 10.1.0, but I am not using that version yet so I cannot look for alternatives.
1d
comment Sequence evaluation in an If statement
I propose closing this as a duplicate of (3700). In my answer there I refer to SequenceHold as the explanation for "shrinking" to If[1 == 0, x].
1d
answered Efficient way to sum all the primes below $N$ million in Mathematica
1d
revised Finding primes that have certain property
added 230 characters in body