32,775 reputation
878162
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
22
comment How to maximize a function over a rotation matrix?
In that case, you really should edit your question to talk about your actual problem, and maybe include sample data and expected results...
Jun
22
comment How to maximize a function over a rotation matrix?
You will want to look up FindGeometricTransform[]; it will be able to find the best rigid transformation between your two sets of points.
Jun
22
comment Have the Random functions changed?
No problem; I couldn't contribute much otherwise since I'm not using a machine with Mathematica at the moment...
Jun
22
revised Have the Random functions changed?
added 933 characters in body
Jun
22
comment Have the Random functions changed?
Actually, digging deeper into old docs, it would seem that the legacy method in fact uses the rule 30 cellular automaton in the integer case. This is borne out by the fact that "Legacy" and "Rule30CA" give identical results for RandomInteger[]. In short, version 8 uses "ExtendedCA" as the default, while version 9 uses "Rule30CA" by default, for both random integers and reals. Now we wait for somebody from WRI to explain this switch...
Jun
22
comment Simplify $\cos(n \pi)$ and $\sin(n \pi)$ when n is an integer
I'm not quite sure why one works and the other doesn't, even though they are ostensibly equivalent; the reason I left a comment is because I am not at a machine with Mathematica. Might I suggest writing your own answer to your own question instead?
Jun
22
comment Simplify $\cos(n \pi)$ and $\sin(n \pi)$ when n is an integer
Did you already try Assuming[Element[n, Integers], 2/Pi Integrate[Cosh[a x] Cos[n x], {x, 0, Pi}]]?
Jun
22
comment Have the Random functions changed?
Well, for completeness' sake, could you also do tests replacing RandomInteger[{-9, 9}, 10] with RandomReal[1, 10]? Maybe use InputForm[] so that all the digits of the random variates are displayed... BTW, to cover the default method in the results of the Table[], you can use the setting Method -> Automatic.
Jun
22
comment Have the Random functions changed?
Huh, that's a step back. Here I thought they replaced the legacy generator with the newer CA-based ones precisely because the legacy method had not too good statistical properties...
Jun
22
comment Have the Random functions changed?
To give a particular example, what does BlockRandom[SeedRandom[42, Method -> "ExtendedCA"]; RandomInteger[{-9, 9}, 10]] return on version 9?
Jun
22
comment Have I found a big difference between using the short form and the long form of a pure function?
To drive home the fact that & is the shorthand form of Function[], ponder on the result of FullForm[{#} &], among other things.
Jun
22
comment Have I found a big difference between using the short form and the long form of a pure function?
Actually, if you're not using the attribute argument of Function[], you can get by with just one argument, without the need for a null first argument; thus, Function[Rest[Level[#, 1]]] @ f[x1, x2, x3, x4] or Function[Function[{##2}] @@ Level[#, 1]] @ f[x1, x2, x3, x4] work nicely.
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