MATLAB: How to pass arguments to matlab executables

MATLAB Compiler

i have a exe name a1.exe
now i need to run this exe using a batch file(.bat file)
i need to pass some input arguments to this exe a1.exe
how can i do this

Best Answer

You can do it via the command line. Just use varargin as your input argument list. Then you might use deal() to parse it out into strings, or just use code like
userArg1 = varargin{1};
userArg2 = varargin{2};
and so on.