FYI, I am using RedHat Linux 6.1 and Matlab 2012a. I have a Matlab function that calls an external executable with a system command among lots of other things. Example:
[s,w] = system('nonMatlabEXE');
I have compiled my Matlab function using:
mcc -m myFunc.m -a /path/to/nonMatlabEXE/* -a /path/to/dataFiles -I /other/required/paths/
This generates the executable 'myFunc', a 'run_myFunc.sh' script, a 'readme.txt', and a mccExludedFiles.log'. However when I run my Matlab compiled exec via Linux command prompt:
run_myFunc.sh /path/to/mcr/
I get "nonMatlabEXE: command not found" errors when I hit that the line with the system command.
So my questions are:
Is it possible to package the non-Matlab executable with my Matlab Compiled app? If not what are my best options? Should I just co-located the non-Matlab executables with the mcc output 'myFunc' and/or modify the shell script 'run_myFunc.sh' to include additional enviroment PATH variables?
Thanks,
Best Answer