help-octave
[Top][All Lists]
Advanced

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

Re: Use a script to pass parameters to and run another script file


From: Jordi Gutiérrez Hermoso
Subject: Re: Use a script to pass parameters to and run another script file
Date: Tue, 30 Dec 2008 16:34:44 -0600

2008/12/30 babelproofreader <address@hidden>:

> Is there a way in which the above script file can be run from a
> second script file, this second script file passing the name of the
> required data text file to be read prior to operations, and
> indicating the text file name that the results should be saved as?

Sure, ever heard of a variable? ;-)

It's not the best programming practice, but as a quick fix, just have
script1 set some global variables that script2 is aware of, and then
have script1 call script2 many times.

Of course, the more robust practice is to turn script2 into a function
and localise the variables, and it's only marginally more work to do
so. Are you familiar with how functions work in Octave?

- Jordi G. H.


reply via email to

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