Reputation
65,134
Next tag badge:
116/100 score
18/20 answers
Badges
4 140 267
Newest
 Enlightened
Impact
~654k people reached

Feb
2
comment How to apply a user-defined function to a list
I have no idea what is possible in W|A Pro, but when it takes real Mathematica syntax, then you should try to define your function as f[n_]:=351n^(-7/10)
Jan
30
comment Parallel compiled functions running on parallel sub-kernels
I'm not sure I understand. Or maybe you misunderstand what I'm doing. In the first example, I run f[data] on the main kernel exactly one time. Takes 9.1 seconds on V10.3.1. Then, I'm calling it 8 times because I have 8 subkernel and it only needs 24 seconds which tells you that one single run indeed only needed 24/8=3 seconds. We are talking about two different parallelizations here. Parallel threads and parallel sub-kernels and I combine both to squeeze the last bit out of my CPU. Ping me in Mathematica Chat if you have further questions.
Jan
26
comment Convert (rescale) 16 Bit png image
Have you inspected your data carefully? It seems that image histogram leaves out values > 250, because the gap of 8 does not hold for all your data. Please look at DeleteDuplicates[imageData] // Sort and after that BitShiftRight[% + 1, 3]...
Jan
24
comment Fast loading of png files
The Import/Export framework is pretty large because it needs to check for all kinds of possibilities. You can distill it down to a call of the function Image`ImportExportDump`ImageReadPNG["tmp/test.png"], but even that does only speed it up a small amount. I'm not sure you can make it really fast without writing external code that calls a fast library. Can you provide your exact system and a sample "PNG"?
Jan
24
comment How can I create a random symmetric matrix in this way?
Sorry. Saw it and thought I need to clear this up as quick as possible so that no one believes it is a good way.
Jan
22
comment List of Mathematica related acronyms and their real meaning
@Mr.Wizard and all others: I made my answer community wiki. Please help to make this a useful post and clear up some of the vague Wolfram marketing speech.
Jan
22
comment List of Mathematica related acronyms and their real meaning
@Moo Let me work this in later.
Jan
22
comment List of Mathematica related acronyms and their real meaning
@MikeHoneychurch I have added the Bloomberg information.
Jan
22
comment List of Mathematica related acronyms and their real meaning
@Moo Ha, haven't seen this. Everything counts that the community is interested in. I wouldn't take SystemModeller because it is far off of Mathematica, but I believe it is a good thing to clear up related technologies.
Jan
22
comment List of Mathematica related acronyms and their real meaning
If you feel that I missed some important thing, then comment and I'll add it to the list. I have not included all link technologies but only the IMO most important ones that have many questions here on SE. Additionally, please help to clear up WPC, WPL, Mathematica Online, W Finance, W Discov P, W Data Framew. What exactly are they doing and how do they relate to Mathematica?
Jan
20
comment Is it possible for librarylink function to be Listable like that in Compile?
That is because their highlevel code (the part before the LibraryFunction that is used as fall-back) is the same as the compiled library code. I suspect that when the function is too easy (like returning only x), then Mathematica detects this an doesn't bother to call the library function.
Jan
20
comment Is it possible for librarylink function to be Listable like that in Compile?
Just for fun, try to use the option Evaluated -> False in DensityPlot and if this doesn't work, try to wrap your compiled function wey01 like this: test[args__?NumericQ]:=wey01[args] and then plot test.
Jan
20
comment Is it possible for librarylink function to be Listable like that in Compile?
@matheorem If you speak about DensityPlot using the listability, then as far as I know it never does this. All plot routines will evaluate the functions serially and not in parallel.
Jan
19
comment Is it possible for librarylink function to be Listable like that in Compile?
I know you didn't mean it that way, but that's the most straight-forward way to get similar behavior. AFAIK, functions that are compiled with parallelization and Listable are not different from others. The parallelization happens in a layer before the actual underlying compiled function. This all is hidden from the user and I'm not sure you can access it to at least see how they did it and when exactly it happens.
Jan
19
comment Is it possible for librarylink function to be Listable like that in Compile?
It is possible to parallelize the library function yourself by using frameworks like OpenMP. Other than that, I'm very pessimistic that you can persuade a library function easily to act like a listable compiled function.
Jan
17
comment Mandelbrot set—efficiently iterate over a list of initial points
When you use Compile, then the numbers will always be machine precision numbers like double in C/C++. Mathematica is able to calculate with arbitrary precision numbers, but as soon as you compile something, you are stuck with the usual machine type numbers.
Jan
15
comment Question regarding exporting of mx files
I'm not entirely sure I get what you mean, because words like parse and format just don't make sense in this Mathematica context. Nevertheless, I have updated my answer at the end with a different approach.
Jan
15
comment Asynchronous Programming
The header is within the same directory as the demo files and the "async-examples-libmain.c" file. I easily find it with FileNames["async-examples.h", {$InstallationDirectory}, Infinity] too.
Jan
15
comment Asynchronous Programming
If I have missed to discuss some important point, please comment and I try to elaborate on it.
Jan
13
comment Get position from one list and choose element of another list in Compile
This is called a ragged array and it cannot be used as natural inside Compile as you might think. There are ways to solve this, but that are advanced and you already need to be quite confident with Compile to use them. In general, just think of it as impossible to either give ragged arrays as input or return them.