How to speed up MATLAB codes?

As MATLAB is a mathematical language, its speed is not as fast as it is. I am wondering what common methods speed up MATLAB code execution? For example, I know that if instead of starting for loops, you can perform calculations in vector / matrix format, he / she will see the acceleration when the code runs.

I am wondering what other suggestions.

+5
source share
5 answers

You can start looking at some ways to start thinking about vectorization here .
After this, the PDF file here , although incomplete, provides many Matlabs that give good performance.

+1
source

:

  • , ,
  • ,
  • (, bsxfun)
  • Matlab - 5 .
  • / .
  • Java C/++ ( )
+5

Lightspeed.

Tom Minka Lightspeed Mac. , Mac. : OS X 10.8.5 Xcode 4.6.3 Matlab 2011a

1) , Lightspeed NO . , "Library/Application Support/Matlab", . , , Tomer Levinboim (levinboim.blogspot.co.nz) , !

2) " Matlab Mex Mac" Mathworks (http://www.mathworks.com/matlabcentral/answers/94092), /, Levinboim.

3) .COMPFLAGS install_lightspeed.m , :

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk

4) Matlab , Lightspeed. install_lightspeed. test_lightspeed. Lightspeed!

5) , startup.sh, Read Me, Mac. , , :
startup.m? http://obasic.net/set-your-customized-startup-file-for-matlab.

+2

: MATLAB. Pascal Getreuer : Lightspeed Toolbox. ...

0
source

All Articles