Você está na página 1de 6

September 28, 2011

[JANS HENDRY / EE&IT UGM, INDONESIA]

HOW TO MAKE STANDALONE EXECUTABLE FILE FROM MATLAB PROGRAM Please see at the last page before
continuing... It is extremely important!!! This article will guide you how to make standalone executable from matlab program. As we know well that matlab is kind of interpreted language which means this program do not result exe file when it is executed. Also, we can just write syntax in command window and get result directly. Then it become a problem when one want to have exe file from codes written. Fortunately, matlab has solution for this problem. They dont let us alone and its amazing. As i know we can have exe file even for programs that contain more than one m file. So as i said, it is amazing. Below steps will guide you to make your own executable file by using matlab itself. I try this with R2009a version of Matlab, so i cant guarantee that this solution will solve in version under. Please type this command in your command window: deploy tool You need to fill requirements below

September 28, 2011

[JANS HENDRY / EE&IT UGM, INDONESIA]

In this case i choose windows standalone application but you can choose upper choice instead. Do not forget to fill Name and Location (this is where your exe file will be saved). Then click OK. Then at the right side of your matlab command window will appear

Now you choose Main Function folder and click

2nd click this button 1st choose this folder

September 28, 2011

[JANS HENDRY / EE&IT UGM, INDONESIA]

You will need to choose a program as your main program. I consider that you totally understand which file of yours stated as main program.

In this case i choose realtimeosciloscope as main program. After clicking Open, your Main Function Folder will contain that file

Now we choose other part of program that stated as Other Files. And we put all the program in Other Files Folder just like below

September 28, 2011

[JANS HENDRY / EE&IT UGM, INDONESIA]

You can see that i filled my Other Files folder with other dependent m file. Yes! My main program need those files. If you only have 1 program as main program, then you dont have to add other files to Other Files Folder. Just add to Main Function. And also you need to know that you dont have to put complementary files to Other Files Folder consecutively. Just add it arbitrarily. By clicking SETTING at the bottom of the window

you can see where your MCR files that used by matlab to compile your project stored in your computer. After completing all procedure, last step you need to do is to build the project by clicking

Click to build project

Then at the bottom of your command window will be docked another window like this 4

September 28, 2011

[JANS HENDRY / EE&IT UGM, INDONESIA]

It means that matlab is compiling your project and needs time. So please give your time for matlab, moreover it will need much more time when you have many m files included. When compiling complete, the window will show you all activities

Process completed

Please check your location folder that you have put at the beginning step. You will see a folder named :

Its my folder, not yours.. When you open this folder, it will contains 2 folders : o distrib folder contains exe file that you can distribute directly. o src folder contains exe files and source file in C. Lets double click your exe file, and it will look like this

September 28, 2011

[JANS HENDRY / EE&IT UGM, INDONESIA]

DONE!!!

NOTE!!!
Prerequisites for Deployment * Verify the MATLAB Compiler Runtime (MCR) is installed and ensure you have installed version 7.10. * If the MCR is not installed, run MCRInstaller, located in: C:\Program Files\MATLAB\R2009a\toolbox\compiler\deploy\win32\MCRInstaller.exe For more information on the MCR Installer, see the MATLAB Compiler documentation.

~~~ TERIMA KASIH ~~~

Você também pode gostar