43,944 reputation
568177
bio website
location
age
visits member for 2 years, 8 months
seen 2 hours ago

Sep
22
comment Creating a foggy image
Very nice. Maybe add a bit of white for scattering of ambient light? ImageApply[0.7 # + 0.3 &, foggy]
Sep
22
comment Elementwise operation, part deux
@IgorRivin, for a version of Scan with a generator expression instead of a list, have a look at Do ;-)
Sep
22
comment Counting number of trues in If condition inside a For loop
It works just as well without the DeleteCases
Sep
21
comment Fractal dimension of a large networked molecular system
When you have two distinct questions it is generally better to ask them separately. The site is easier for people to use that way (eg a future user looking for how to visualize secondary structure might overlook a question which appears to be about fractal dimensions). Also, you can only accept one answer, so what will you do if you get awesome but separate answers to both questions?
Sep
21
comment calling CUDA library functions
This looks great. CUDALink is broken (again) on my home PC but I'll test it at work on the Quadro 4000 tomorrow.
Sep
21
comment Exporting images as .avi
It might be worth adding a note that one can use ConformImages to do the conversion in version 10
Sep
20
comment How to plot a Circles-and-Squares fractal
@BoC., sorry I don't quite understand what you're asking. You would have to do some analysis to see why the circles are the sizes they are.
Sep
20
comment How can I restore the old `ImageCompose` behaviour?
This solution seems robust - I can't find a way to break it! And it's faster (and probably more accurate) than post-processing the result from broken ImageCompose. Thanks again.
Sep
20
comment How to plot a Circles-and-Squares fractal
@MichaelE2, love it! Try this one: {b,h}=Rescale@#@results[[3]]&/@{Abs,Arg}; Image[{h,1-0b,1-b},Interleaving->False,ColorSpace->"HSB"]
Sep
19
comment Using Permutations to create numbers
+1 Nice. You could count count in twos and eliminate the EvenQ test for even shorter code Select[Range[0,999,2],#⋂0~Range~5==Sort@#&@*IntegerDigits]
Sep
19
comment How can I restore the old `ImageCompose` behaviour?
Many thanks for the suggestion. The Export-Import conversion seems to remove the alpha channel though. However I can rasterize direct to Image and maintain the alpha channel using Rasterize[Overlay[{i1, i2}], "Image", Background -> None]. I have some tests to run but this looks good so far.
Sep
19
comment Export notebook as epub?
I would add that if a command line converter is available it could be called from Mathematica using Run
Sep
19
comment Creating a three dimensional fullerene molecule
The output from the built-in MoleculePlot is just a Graphics3D expression with spheres for the atoms and cylinders for the bonds. So use something like % /. {c_Cylinder :> Style[c, Red], s_Sphere :> Style[s, Blue]}
Sep
19
comment How to plot a Circles-and-Squares fractal
No doubt there are more concise ways but try With[{r = Range[-50, 50]^2}, Image@Rescale@Mod[Outer[Plus, r, r], 100]]
Sep
18
comment Setting the elements of a list equal to elements of a different list
It wasn't me that downvoted, but I would guess it's because C is Protected, and C[pos] should have been C[[pos]]. Also Set by itself is cleaner than Set[#1, #2]&
Sep
17
comment How to multiply specific columns in a matrix of data?
Thanks Mr.Wizard, I always get an upvote or two for that when you use it :-)
Sep
17
comment Extract common subexpressions from expressions
Also see this answer from Leonid
Sep
15
comment drawing core-shell structure
Also similar
Sep
11
comment Strange Behavior when making Equal Listable in Pick
@Mr.Wizard, done.
Sep
11
comment Complement change order of elements
@Mr.Wizard, it was late and I was too lazy to properly check if both questions were asking the same thing, so I just posted the link in case anyone else was looking for it. As there are still no close votes I guess the community consensus is that it's not a duplicate.