Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Ray
Posts:
11
Registered:
7/6/08


Re: Command line questions...
Posted:
Jul 7, 2008 12:26 PM


"Scott Hirsch" <shirsch.nospam@mathworks.com> wrote in message <g4suri$oi1$1@fred.mathworks.com>... > 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 mfiles 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.
Hi Scott,
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!
Thanks, Ray



