The Archives

Sayanee's blog 2005 - 2012. Checkout her latest blog!

From m-file to *.exe file

21 Apr 2007 on Musing

How to convert from MATLAB m-file to a stand-alone *.exe file? Let’s use hopGraph.m as an example. Here’s how to do it…

  1. add this code on line 1 of hopGraph.m function hopGraph()
  2. in the MATLAB workspace type in this command » mcc -m hopGraph.m
  3. Compiler Value is 1
  4. Go to the folder where hopGraph.m is kept and open the hopGraph.exe :D
  5. Done!!!!

little warning: this exe file will not work in a computer with no MATLAB installed! I haven’t been able to locate the *.dll files that needs to do this :(