Jonas Teuwen
Reputation
518
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
3 13
Impact
~13k people reached

• 0 posts edited
• 0 helpful flags
• 33 votes cast

# 102 Actions

 May 22 awarded Popular Question Mar 16 awarded Popular Question Jan 14 awarded Popular Question Nov 3 awarded Nice Question Oct 9 comment Coloring random points in an annulus @kguler: Yes, when I set randomInAnnulus[R1_, R2_, cb_: 0, n_: 100] := Transpose@{# Cos@#2 + cb, # Sin@#2 + cb} &[ Sqrt@RandomReal[{R1, R2}^2, n], RandomReal[2 \[Pi], n]]; and I pick cb so large that x*y > 0 for all points I get an error. Oct 8 comment Coloring random points in an annulus It does work well, but if I replace the condition for the check with another one it fails if there are no such points (for instance when I shift the annulus in the first kwadrant. Is there an easy way to resolve this? Oct 7 accepted Coloring random points in an annulus Oct 6 comment Coloring random points in an annulus Is there any advantage (i.e., speed) in using any of those three? Oct 6 comment Coloring random points in an annulus Yes, I have noticed it is quite slow. Do you have any ideas how to do it faster? Oct 6 asked Coloring random points in an annulus Jul 2 awarded Curious Apr 26 awarded Notable Question Jan 25 awarded Yearling Feb 6 awarded Popular Question Jan 25 awarded Yearling Apr 7 comment How do I use the result of Solve in a function definition? @SjoerdC.deVries Well, when at the same time when I call a function. So not only if I execute the whole worksheet. Apr 7 accepted How do I use the result of Solve in a function definition? Apr 7 comment How do I use the result of Solve in a function definition? @SjoerdC.deVries Thanks. I know this, but the way I made it set Z to a particular value, but I have fixed it in another way. Apr 6 comment How do I use the result of Solve in a function definition? @RM Right, good point! Can you explain why I cannot use capital letters as function names? Apr 6 comment How do I use the result of Solve in a function definition? Thanks, I will try this, but I think there was a problem when $z$ was already set (by running it once with different amax). Is there a way to reset the value of z before doing a computation?