| MATLAB Compiler | ![]() |
Calling a Function from the Command Line
You can make a MATLAB function into a stand-alone executable that is directly callable from the system command line. All the arguments passed to the MATLAB function from the system command line are strings. Two techniques to work with these functions are
function x=foo(a, b) if (isstr(a)), a = str2num(a), end; if (isstr(b)), b = str2num(b), end; % The rest of your M-code here...
You only do this if your function expects numeric input. If your function expects strings, there is nothing to do because that's the default from the command line.
| Compiler Tips | Using MAT-Files in Deployed Applications | ![]() |
© 1994-2005 The MathWorks, Inc.