33,586 reputation
883167
bio website
location
age
visits member for 2 years, 9 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
22
comment Reverse after ImageData?
The reversal is needed simply because different coordinate systems are in use. The coordinate system for images is different from the Cartesian coordinate system implicit in the density plots, and we thus have to do a transformation.
Jun
22
comment Have I found a big difference between using the short form and the long form of a pure function?
Function[{u1,u2}, {u2}] is equivalent to {#2} &, yes. I don't know of any "named argument" equivalent of SlotSequence[].
Jun
21
comment Change of coordinates for an InterpolatingFunction
Hmm, odd; that used to work. Anyway, what I was getting at was that InterpolatingFunction[] objects support some properties. For instance, InterpolatingFunctionInterpolationOrder[y] is equivalent to y["InterpolationOrder"], while InterpolatingFunctionGrid[y] is internally done as y["Grid"]. All of the other functions in that utility package have property equivalents.
Jun
21
comment Change of coordinates for an InterpolatingFunction
You actually don't need to call the package, since the functionality is built-in, and that package is but a convenient inteface. Using your definition of y, try y["Properties"] to see a list of queries you can do.
Jun
21
revised On reimplementing the Select function
edited title
Jun
21
answered On reimplementing the Select function
Jun
21
comment Change of coordinates for an InterpolatingFunction
In general, I'd use ArcTan[#, y[#]] instead of ArcTan[y[#]/#] for polar conversions. In any event, this seems to be a job for FunctionInterpolation[], which tries automatically picks abscissas to interpolate on.
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...