help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing parametes to a script file from inside Octave


From: Chengqi Chang
Subject: Re: Passing parametes to a script file from inside Octave
Date: Fri, 01 Oct 2010 23:15:34 +0800
User-agent: Opera Mail/10.70 (Win32)

在 Fri, 01 Oct 2010 20:49:32 +0800,<address@hidden> 写道:

Is there any way I can pass parameters to a script? When calling a script directly, from the OS command-line, it's easy. But what if I am inside an Octave session?

To clarify: I do not want to call a function, I want to call a script.

If you are calling a script within an Octave session, assign the value you want to the parameters directly. Since a script share the same workspace(in Matlab terminlogy) with the Octave session itself, any variables you assigned can be "seen" by the script.

If it is not the case above and the approach above does not work, there is an "ultimate approach" ---- store the value in a file on your harddisk and load it from the script.
--
Best Regards
-----------------------
Yours Sincerely                    Chengqi Chang
China Center for Economic Research
http://blog.macro2.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]