Ｊ. Ｍ.
Reputation
35,031
117/100 score
 Jun22 comment Change of coordinates for an InterpolatingFunction I'm not sure; after all, this is undocumented functionality... Jun22 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... Jun22 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. Jun22 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... Jun22 revised Have the Random functions changed? added 933 characters in body Jun22 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... Jun22 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? Jun22 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}]]? Jun22 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. Jun22 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... Jun22 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? Jun22 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. Jun22 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. Jun22 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. Jun22 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[]. Jun21 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. Jun21 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. Jun21 revised On reimplementing the Select function edited title Jun21 answered On reimplementing the Select function Jun21 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.