34,427 reputation
549142
bio website
location
age
visits member for 2 years
seen 2 hours ago

Nov
9
comment How to make brute force coding more efficient?
To be honest though, if you want to improve the efficiency of this sort of brute force approach in Mathematica, Compile is often the best way to go, and if you're compiling then you should do the same sort of things you would do in C, like bailing out of loops early.
Nov
9
comment How to make brute force coding more efficient?
@JanneK, FWIW, the "Mathematica way" to write your algorithm would be to use the Listable attribute of Mod (which will be faster than mapping Mod over the list): i = 1; With[{r = Range[20]}, While[Total[Mod[++i, r]] != 0]]; i
Nov
9
answered How to make brute force coding more efficient?
Nov
8
comment How to display only a certain part of the content in a Panel?
@subbu, I don't use google chrome. Can you describe what makes the appearance good?
Nov
8
comment Plotting reordered clusters with different colors and joined lines
@Emy, there's a problem with antialiasing in graphics with VertexColors, see here for example.
Nov
8
revised Plotting reordered clusters with different colors and joined lines
added 1475 characters in body
Nov
7
answered Plotting reordered clusters with different colors and joined lines
Nov
7
comment How to display only a certain part of the content in a Panel?
@subbu, I'm not sure what you mean. Can you explain in more detail?
Nov
7
answered How to display only a certain part of the content in a Panel?
Nov
6
comment Accessing the graph Thinning produces without losing all the edges' lengths/slopes
@SvenK, it's an interesting problem. I wonder if the EdgeWeights (i.e. skeleton length in pixels) could be compared to the Euclidean distance between two vertices, to estimate how straight or curvy the line is.
Nov
6
answered Fluorescence Correlation Spectroscopy Simulation
Nov
3
comment How can I prevent ColorFunction from disabling antialiasing in graphics?
The white point moves relative to the black point, like in your picture, and the axes move a tiny bit but don't go blurry. The tick marks get smaller too.
Nov
3
comment How can I prevent ColorFunction from disabling antialiasing in graphics?
I get the same thing (on Windows 7, Mathematica 8.04). The text in e.g. Plot[x,{x,0,1}] is smoothed with ClearType (subpixel rendering), whereas the text in Plot[x,{x,0,1},ColorFunction->(Blue&)] is not. If I turn off ClearType the text in both plots is the same.
Nov
3
answered Accessing the graph Thinning produces without losing all the edges' lengths/slopes
Nov
2
comment Vectors with a certain magnitude in Mathematica
@J.M., hopefully one day I'll have a great idea that isn't 40 years too late :-)
Nov
2
comment How to do equality check of a large matrix and get the corresponding index position?
To summarise: you are probably better off with kguler's solution!
Nov
2
comment How to do equality check of a large matrix and get the corresponding index position?
@sebastiancheung, the code above works with {n,m} = {5,1000}, but I may have misinterpreted the question. In my code a and b must have the same Length (i.e. same number of rows) so you might need to transpose a. Note that I've compared across rows of b, (i.e. element a[[i,j]] is compared with the elements of b[[i]]). So you might need to transpose b too. I've also assumed that the each row of b is in increasing numerical order. If that's not the case then my approach doesn't work at all.
Nov
1
comment Restricted accumulation of values
HeavisideTheta[0] is undefined, so this has problems if the total reaches zero.
Nov
1
answered Vectors with a certain magnitude in Mathematica
Nov
1
answered How to do equality check of a large matrix and get the corresponding index position?