Print

Print


There is a lot then can be done to improve Matlab loop performance.

Some good example are here in "Tips for improving Performance"

http://www.mathworks.com/help/matlab/matlab_prog/techniques-for-improving-performance.html

and "Vectorization"

http://www.mathworks.com/help/matlab/matlab_prog/vectorization.html

And of course you can replace loops with function calls to compiled mex files.



On Sat, Jul 13, 2013 at 11:26 AM, Karl Thurnhofer <[log in to unmask]> wrote:
Hello!
 
I'm developing a Matlab toolbox for SPM to apply a compartmental model (STRM) to PET studies and obtain biological parameters.
The problem is that the program takes a long time to run because there is a loop that is performed by each basic function, which is loaded with huge matrix operations for each of the voxels in one frame, and if there is a substantial number of these functions the program takes much time.
 
I have found that in other programs that implement the same method but based on java, PMOD, does the same in seconds. Is there any way to optimize it with Matlab?
 
Thank you.