Deploying MATLAB code on MAC.

by raulzito234

Apparently it’s possible to deploy/compile MATLAB code, following instructions from here:

First you need to run:

>> deploytool

Add the main function and the helper files. After done, install mcr that can be found here.

To be able to run the code you need to set the environment variable DYLD_LIBRARY_PATH to the folders list in the README file under the created project folder. The README file says to run the command setenv on your MAC. setenv may not be part of the bash shell. Therefore, you should run the following command:

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:<mcr_root>/v80/runtime/maci64:<mcr_root>/v80/sys/os/maci64:<mcr_root>/v80/bin/maci64:/Applications/matlab/MATLAB_Compiler_Runtime/v80/bin/maci64:System/Library/Frameworks/JavaVM.framework/JavaVM:/System/Library/Frameworks/JavaVM.framework/Libraries

Where <mcr_root> is the path of the Matlab runtime compiler.

Also you can upload the code directly to the file ~/.cshrc

Advertisements