32,815 reputation
878163
bio website
location
age
visits member for 2 years, 6 months
seen Jun 24 '13 at 0:02

No, his mind is not for rent
to any god or government.
Always hopeful, yet discontent.
He knows changes aren't permanent,
but change is.

— Rush, Tom Sawyer


Taking an externally-imposed and much-needed break from SE activities.

E-mail (flipped ROT13): zqd˙ʎʌuzʇ@ʇɐʌǝɥʇʌssqɹǝɥɟuɹʎɔ
Any code I've posted here I place under the WTFPL.


Jun
21
revised Change of coordinates for an InterpolatingFunction
deleted 12 characters in body
Jun
21
comment On reimplementing the Select function
...or, one could have done n : (_Integer?Positive | Infinity) : Infinity.
Jun
21
revised How to integrate a function over a 3D planar polygon?
edited tags
Jun
21
comment On reimplementing the Select function
Consider whileSelect[l1_List, crit_, n_Integer] := Module[{l1temp = l1, l2 = {}, temp}, While[Length[l1temp] > 0 && Length[l2] < n, temp = First[l1temp]; If[crit[temp], AppendTo[l2, temp]]; l1temp = Rest[l1temp]]; l2], and note well what I did differently.
Jun
21
comment On reimplementing the Select function
You're supposed to store l1 in a temporary variable. Try whileSelect[l1_List, crit_, n_] := Module[{l1temp = l1, l2}, (* stuff *)]. l1 = Rest[l1] will not work because if, say, you executed whileSelect[{1, 2, 3, 4, 6, 8, 10}, EvenQ, 3], you then encounter absurdities like {1, 2, 3, 4, 6, 8, 10} = Rest[{1, 2, 3, 4, 6, 8, 10}] due to replacement. But I'll let someone else flesh out the details...
Jun
21
revised Keeping Integrate from making unnecessary assumptions
deleted 72 characters in body; edited tags
Jun
21
reviewed Edit suggested edit on Using RecurrenceTable index to call elements of a vector
Jun
21
revised Using RecurrenceTable index to call elements of a vector
added 27 characters in body
Jun
20
comment 1 Plot, 2 Scale/Axis
@Öskå, yes, I really should be looking into that, but I've been somewhat busy lately. I do promise to work on this in the near future.
Jun
20
comment Fast integration of 2D distribution across lines parallel to y-axis
Well, magic... okay, no. I knew the Unicode for these, so I put 'em in.
Jun
20
revised Fast integration of 2D distribution across lines parallel to y-axis
deleted 30 characters in body
Jun
20
revised Coarse-graining and/or sorting of a list of arbitrary triades {x,y,z} in the (x,y) plane
edited tags
Jun
20
comment Fit implicit function
That's essentially what I did in my answer to the other question...
Jun
20
comment Composition with Apply
Not as compact as your version using Fold[], so I'm not posting this as an answer: (Composition @@ Function[f, Apply[f, #] &] /@ {{#1, 0, #2} &, {#2, #1} &, {##1} &})[{1, 2}].
Jun
20
comment Fit implicit function
If you're fitting ellipses to data, you might be interested to know that there are special methods like this... but to start you off: NArgMin[{Norm[Function[{x, y}, a x^2 + 2 b x y + c y^2 - e] @@@ pts], b^2 - a c == -1}, {a, b, c, e}].
Jun
20
comment Efficiently initialize list of consecutively named variables for file import
Would Do[With[{file = ToExpression["$runningLogFile" <> ToString[k]]}, Set @@ {file, ToString[StringForm["m`1`.txt", k]]}; If[FileExistsQ[file], Get[file], Print["Error: Noexist"]]], {k, 5}] work?
Jun
20
comment Fit implicit function
Okay, but you still need to include pts somewhere, as the rest of us don't have it... on another note, you wouldn't happen to have initial guesses for your parameters, no?
Jun
20
comment xkcd-style graphs
@Mr.Wizard, the rule that I was accustomed to was that since "Woods" is Simon's fine surname, and manifestly not plural, the proper course for forming the possessive is "Woods's", and AFAICT this is not one of those exceptions of a singular noun whose possessive is formed by simply appending an apostrophe. There is a mention of this in Strunk and White, off the top of my head.
Jun
20
revised xkcd-style graphs
deleted 13 characters in body
Jun
20
revised How can Mathematica convert CMYK values to RGB or HSB?
deleted 47 characters in body; edited title