Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Command line arguments when a matlab script file is run.

137 views
Skip to first unread message

evan um

unread,
Aug 3, 2008, 12:25:03 PM8/3/08
to
Hi,
I would like to get some helps.
I want to pass my input file name using command line
arguments when my MATLAB script file is started.
Such a way is common in C: command-line arguments are given
after the name of a program in command-line operating
systems like DOS or Linux, and are passed in to the program
from the operating system. Can we do the same thing when we
use MATLAB?
Could you give me some hints?
Thanks!

Best,
Evan


Donn Shull

unread,
Aug 3, 2008, 9:50:03 PM8/3/08
to
"evan um" <eva...@gmail.com> wrote in message
<g74m4v$cbq$1...@fred.mathworks.com>...

MATLAB supports a dual notation for functions with a string
argument as input for example

disp('Hello')

and

disp Hello

both display the string Hello to the command window. Is
this what you are looking for?

0 new messages