"Scott Hirsch" <email@example.com> wrote in message <firstname.lastname@example.org>... > Ray - > > Could you clarify what you mean by "Command Line"? Are you > referring to the MATLAB Command Line, or a system prompt? > If you want to launch MATLAB and have it run specific files > from a system prompt, you can use the -r startup flag, e.g. > > > matlab -r "mymfile" > > The MCR (I assume this is what you are referring to) is an > execution engine only for applications compiled through the > MATLAB compiler. You can't run arbitrary m-files against > it. The only legitimate source of distribution of the MCR > is from a licensee of the Compiler - i.e., somebody who owns > the MATLAB compiler can give copies of the MCR to people who > want to run the applications they build with it.
Yes, in retrospect I was very ambiguous. I'm referring to the System Command Line (the DOS prompt, as it were).
To run a .m file function named FunctionName in a file by the same name, I have gotten the following to work, as you suggested:
matlab -nodesktop -nosplash -r FunctionName
However, the function I am starting needs 6 arguments, with the first 3 being floating point numbers and the last 3 being strings. I've tried every weird permutation I can think of but the values I put in just never get through:
matlab -nodesktop -nosplash -r FunctionName arg1 arg2 arg3 etc.
This part has me stumped. I tried also using variable argument detection withing the .m file function, but I haven't gotten that to work either. I finally resorted to simply putting the arguments in a file, then letting the .m function read them from there. That works, but what a kluge!