How do I pass arguments into and out of my standalone executable?
http://www.mathworks.cn/support/solutions/en/data/1-18448/index.html?solution=1-18448
Generally, the idea of a standalone executable is to simply run it without inputs or outputs.
Input arguments are passed to a standalone application created using MATLAB Compiler in the same way that input arguments are passed to any console based application. The following are example commands to execute an application called "filename" from a DOS or UNIX command prompt with different types of input arguments.
If you wish to pass the contents of a MATLAB variable to the program as an input, the variable must be converted to a string. For example:
for k=1:10
cmd = ['filename ',num2str(k)];
system(cmd);
end
如果我的输入参数是两个矩阵的话, 还是挺麻烦的。 2011b后好像不支持将m文件转换成mex,这样就可以像调用m文件一样方便了。