Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Does the MATLAB Compiler speed up the execution time of MATLAB functions?

Asked by MathWorks Support Team on 30 Dec 2010
Latest activity Commented on by Image Analyst on 18 Jun 2014

I would like to speed up functions written in MATLAB code. I would like to know if MATLAB Compiler can improve performance of code.

0 Comments

MathWorks Support Team

Products

2 Answers

Answer by MathWorks Support Team on 30 Dec 2010
Accepted answer

MATLAB Compiler 4.0 (R14) encrypts MATLAB code and wraps it in C. As a result, the source code is still interpreted at run-time, and performance of code should be the same whether run in standalone mode or in MATLAB. There is one important difference for compiled applications. Every time you start a compiled executable, you essentially start another instance of MATLAB. You should be aware of this when comparing performance variations.

See the information below regarding MATLAB Compiler 3.0:

MATLAB Compiler 3.0 (R13) has the ability to translate MATLAB Code into C/C++ code. This code can then be compiled into a standalone application or C-shared library.

The main purpose of the MATLAB Compiler is to provide deployment options for customer applications. It is true that in certain cases you may see a substantial speed increase in your applications after compilation. Though there can be instances where execution actually takes longer.

We make no claims as to the speed increase of MATLAB code after compilation.

Also, certain MATLAB file programming techniques can help execution speed of your MATLAB files.

0 Comments

MathWorks Support Team
Answer by subha on 18 Jun 2014

How to use matlab compiler for my source code

1 Comment

Image Analyst on 18 Jun 2014

You need the MATLAB Compiler product. It's an add-on product that you need to purchase. Contact the Mathworks to purchase it.

subha

Contact us