Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
3
votes
Unusual performance of the Cases function
Consider:
SeedRandom[1];
Cases[{{1, a}, {2, b}, {3, c}, {4, e}},
X_ /; X[[1]] == Part[RandomSample[{1, 3}, 1], 1]] // Trace
As you can see, RandomSample is called separately for every element.
On …
13
votes
Accepted
How can a verbal reasoning question be solved with Mathematica?
To look for a pattern,we get the character codes:
cc= ToCharacterCode["KDXPNGVNQJTLTM"]
(* {75, 68, 88, 80, 78, 71, 86, 78, 81, 74, 84, 76, 84, 77} *)
Then make 2 sequences with the 1,3,5.. and 2,4 …
5
votes
Art on mathematica with filled circles and straight paths: how can I reproduce minimalist suns?
Something like:
n = 50;
rays = Table[{Dashing[Flatten@Table[{RandomReal[.2], .01}, {10}]],
, Line[{{0, 0},
If[EvenQ[n ph/Pi], 2, RandomReal[{0.2, 0.9}]] {Sin[ph],
Cos[ph]}}]}, {ph, …