34,352 reputation
549142
bio website
location
age
visits member for 2 years
seen 58 mins ago

Mar
20
comment FindFaces: how to improve the results of the face recognition feature
@lalmei, no idea at all! Probably best to start at the OpenCV website (linked in this answer) or google "OpenCV beard detection" or similar.
Mar
16
comment How to write efficient code? How to make this example run faster?
Since xx and yy are listable, just using xx[lval, phival] will probably be the fastest method.
Mar
15
comment Reconciling results from Fourier with those form FourierTransform
Have you looked at the definition of Fourier and FourierTransform in the documentation? It is given in the first bullet point under Details and Options for both functions.
Mar
13
comment How to calcuate the sum of 1/x, where x is an integer not containing the digit 9 and 10,000,000 ≤ x ≤ 88,888,888
@gpap, all those extra multiplications make a difference! That pure function is called nearly 79 million times...
Mar
13
comment How to calcuate the sum of 1/x, where x is an integer not containing the digit 9 and 10,000,000 ≤ x ≤ 88,888,888
@Mr.Wizard, I tried Outer originally but kept getting an out of memory crash. The problem was using / for the division, as soon as I put Divide in instead it worked.
Mar
12
comment Why does a variable become real when using the second argument of Dynamic?
FYI you can Spelunk the definitions of BoxForm`RemapVariable and BoxForm`RemapValue, they are indeed kernel functions which do just what you guessed.
Mar
8
comment Improving performance in the generation of random (directed acyclic) graphs
@rasher, the List@@ is there to unpack at level 1, so that a and b will remain packed. See this for discussion.
Mar
7
comment combining manipulate with “static” plot
Look up Show for combining graphics, and PlotRange for fixing the range of plots
Mar
7
comment 2D Fourier transform of a table - ArrayPlot issue
RotateLeft can rotate rows and columns in one go: RotateLeft[ft, {hshift, wshift}]
Mar
4
comment Plot Matlab icon
I must admit I ignored the stuff about how they actually created the logo, finding the finite difference solution more interesting!
Mar
3
comment GatherBy and two conditions
You can gather into nested sublists using GatherBy[list, {#[[3]] == 6 &, Last}]
Mar
3
comment For loop in Mathematica
I fixed your code using Halirutan's awesome browser script. Generally it is simpler just to avoid using Greek letters in code you post here.
Mar
2
comment How can you convert a matrix back into a list of lists?
possible duplicate of Why does MatrixForm affect calculations?
Mar
2
comment How to fill a whole rectangle with text?
Looks like a bug to me. I used StringTake[ExampleData[...], n] and varied n with a Manipulate. For some string lengths the font is magnified as expected, for others it isn't.
Mar
2
comment Re-arranging / selecting of a data table very slow in For loop
It's slightly quicker, at least on my PC with this data, to just use Mean /@ GatherBy[test, First]
Mar
2
comment How can I add drop shadows and specular highlights to 2D graphics?
@rm-rf, thanks. I'll put the code onto github.
Mar
1
comment Is there a way to “hold” prefix / infix / postfix notation?
Does Interpretation[Postfix[foo // bar], foo // bar] work?
Feb
28
comment Plot Matlab icon
@xzczd, LaplacianFilter implements the Discrete Laplace Operator with a convolution. The second argument of LaplacianFilter just determines the size of the convolution kernel. By setting this to 1 the smallest possible kernel is used (3x3) which keeps lapMatrix as sparse as possible. If you use a larger kernel you will get a bit more accuracy but slow down the eigenvector calculation.
Feb
26
comment Something faster than Do loops with AppendTo
@rasher, I assumed that the v1 given in the question was an example and it would not generally be Range[n], but it's a good point worth mentioning.
Feb
25
comment Mathematica averaging a big list of large images
Why 0 set[[1]] and not just 0 ?