40,479 reputation
560165
bio website
location
age
visits member for 2 years, 5 months
seen 29 mins ago

Apr
20
comment Find continuous sequences inside a list
I very nearly posted the same answer (except using [[All, {1,-1}]]) first, but the phone rang. Next time I'll let it ring!
Apr
19
comment What technical obstacles prevent all Mathematica code compiling to C
I think bundling the complete kernel is pretty much unavoidable if the whole language is to be supported. How would a compiler determine what functionality to include if the code was something like ToExpression@FromCharacterCode@{50, 43, 50}? Or even something as simple as <<file. It think with a language like Mathematica that makes no real distinction between code and data, the difference between compiled and interpreted is more than just a marketing decision.
Apr
18
comment Iterating Reads From a Text File and Writing the Results of Operation
I agree that you need to read each line, but your code reads the whole file 280 times, once for each number you're looking for. What I'm suggesting is to read the file just once and store all the column 8 values in a list. You can then find the positions of the various numbers.
Apr
18
answered Graph does not evaluate some options when not displayed
Apr
18
comment How can I generate this “domain coloring” plot?
@rcollyer, I'm not sure what you mean. There must be many ways to map from the complex unit circle to the real number line, e.g. Re[z]/(1-Im[z]) but I don't get how it relates to this answer?
Apr
18
comment Iterating Reads From a Text File and Writing the Results of Operation
It's not clear why my answer above doesn't help you. Also, your question refers to finding the list of row numbers at which the target integer appears, but your code here which you say "does the trick" just counts how many times the target appears. Which is correct?
Apr
16
awarded  Nice Question
Apr
16
answered How can I find if the number of subsets for a list is very large?
Apr
16
comment How can I find if the number of subsets for a list is very large?
@rm-rf, on my system Developer`$MaxMachineInteger is $2^{31}-1$, which is considerably smaller than the number of subsets.
Apr
16
revised How can I make threading more flexible?
added 28 characters in body
Apr
16
comment How can I make threading more flexible?
It won't work with heads other than List - I should put an ?ArrayQ check in the pattern.
Apr
16
comment How can I make threading more flexible?
@Rojo, your first two examples are as expected. The output has to be the same shape as one of the inputs, normally whichever one has the greater ArrayDepth, but if they both have the same depth the output takes the shape of the first input.
Apr
16
comment How can I make threading more flexible?
I've patched it up using a third argument to indicate if a and b have been swapped, but I'm trying to think of a neater way to handle it.
Apr
16
revised How can I make threading more flexible?
added 80 characters in body
Apr
16
comment How can I make threading more flexible?
Thanks, @Rojo, good catch. I must have only tested it on Orderless functions...
Apr
16
answered How can I make threading more flexible?
Apr
16
asked How can I make threading more flexible?
Apr
15
comment Doing local FFT on huge 3D vector data cell mesh and visualizing it spatially?
Yes, I'm assuming that the full data set will be too large for Mathematica to handle, though with 30GB of RAM perhaps that's not the case. You could try it and see.
Apr
15
comment Doing local FFT on huge 3D vector data cell mesh and visualizing it spatially?
I think the visualisation should be fairly straightforward, the difficult bit will be rearranging the data in order to do the FFTs. The problem is that you need the complete time sequence for a cell before you can take the FFT, but that time sequence is split up across several hundred files. You probably need to pre-process the input data to convert from a temporal to a spatial division, e.g. with 300 files each one containing the complete time sequence for 10000 cells.
Apr
11
revised Summation over 3 lists
deleted 222 characters in body