Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an executable .exe file from a .m file

I was wondering if there is a way to create a '.exe' file from ' .m' file in MATLAB, such that it can be run in machine which does not have MATLAB (like it can be done in C, C++).

I know writing a MATLAB function is one way, but I am not sure if it can run in machine without MATLAB.

Also I would like to hide my code and just create a script which can be run by a user using his own data files.

like image 360
AP. Avatar asked Dec 18 '09 03:12

AP.


People also ask

Can you create executables with MATLAB?

This example shows how to generate a C executable from MATLAB® code using the MATLAB Coder™ app. In this example, you generate an executable for a MATLAB function that generates a random scalar value. Using the app, you: Generate a an example C main function that calls the generated library function.


1 Answers

The Matlab Compiler is the standard way to do this. mcc is the command. The Matlab Runtime is required to run the programs; I'm not sure if it can be directly integrated with the executable or not.

like image 192
phoebus Avatar answered Sep 22 '22 21:09

phoebus