Reputation
59,988
Next tag badge:
228/100 score
17/20 answers
Badges
7 106 237
Newest
 Good Answer
Impact
~835k people reached

Nov
8
awarded  Nice Answer
Nov
8
comment TrigExpand Idiosyncracies
I assume that somewhere inside TrigExpand the pattern Sin[_]^2 f_[_] leads to different transformation rules according to whether f is a trig function or not. You have simply found a case where one of those transformations gives a result which a human mathematician would discard as inelegant.
Nov
7
answered How do I understand ListCorrelate(contains $\{k_L,k_R\}$) when it works for 2-dimentional data?
Nov
7
comment Matrix multiplication
Yes I figured the question was more about the memory usage than the specific example, that's why I posted a comment instead of an answer. All I can really say about the speed is that I know that Dot is super-optimised for packed arrays, far far quicker than the equivalent number of arithmetic operations. I expect @ybeltukov or @Szabolcs could give a more knowledgeable explanation.
Nov
7
comment draw part of parabola using graphics
@user2485710, Fit does least-squares fitting. There will be plenty of curve fitting libraries for C if you google it. For this specific case it's overkill in fact, because there is an exact solution for the quadratic passing through 3 points. I just used Fit because it's quick and easy to do it that way in Mathematica.
Nov
7
comment Matrix multiplication
Try this instead w = First@Transpose[v]; f = Array[Cos[#1 #2] &, {dim, dim}]; u = Transpose[w].f.w; result = u + Transpose[u];
Nov
7
comment draw part of parabola using graphics
@ubpdqn, I wouldn't worry about it. Ugly code that works is still code that works :-)
Nov
7
comment Matrix multiplication
It seems to me that t = Total[v]; u = Transpose[t].t; result = u + Transpose[u]; will give the same result in a fraction of the time.
Nov
7
answered draw part of parabola using graphics
Nov
7
comment Glitch in Filling?
Seems to be related to the last point of the first line being lower than the second to last point of the second curve. Try this Manipulate[ ListLinePlot[{{10, 10, a}, {b, b, 0}, {0, 0}}, Filling -> {1 -> {{2}, Brown}, 2 -> {{3}, Gray}}, PlotRange -> {{1, 3}, {0, 11}}], {{a, 7}, 0, 10}, {{b, 5}, 1, 9}]
Nov
2
reviewed Close StreamPlot in a system x´ = f[x] + g[t]
Nov
2
comment Integrating elements from matrix
It's great that you included your code, but please add more description about what you are trying to do. It's hard to understand an algorithm by looking at code which fails to implement it.
Oct
31
comment Why does the documentation call functions “pure”?
@Nasser, I think your comment would make a good answer.
Oct
31
awarded  Good Answer
Oct
29
comment Raster to Image conversion problem
+1 A nice bit of detective work. I think you are correct about the optimisation. If you set SetSystemOptions["ImageProcessingOptions" -> {"Verbose" -> True}] you get some debug output referring to "fast conversion".
Oct
27
reviewed Leave Open Importing data from files designated in an InputString dialog box
Oct
27
comment how to speedup subpixel registration
To extract the transformation directly from ImageAlign, use the secret option ImageAlign[i0, small, "FindGeometricTransformOutputQ" -> True]
Oct
27
comment I'm trying to make an internet radio alarm clock
@belisarius, ah okay. I didn't know that. Sorry for the false hope, user12876
Oct
26
comment I'm trying to make an internet radio alarm clock
Have you seen RunScheduledTask ?
Oct
26
comment FindFaces: how to improve the results of the face recognition feature
@user15961, it's very strange. I'm sorry but I have no clue what could be causing it! There should be no difference between using the Automatic option and explicitly specifying the same file.