help-octave
[Top][All Lists]
Advanced

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

Re: how to parse function parameter in octave?


From: John W. Eaton
Subject: Re: how to parse function parameter in octave?
Date: Fri, 29 Sep 2006 15:52:52 -0400

On 29-Sep-2006, Miroslaw Kwasniak wrote:

| On Fri, Sep 29, 2006 at 11:04:05AM -0700, frank wang wrote:
| > Hi,
| > 
| > I am trying to run the octave function in bash command. I can do such
| > command in bash shell
| > 
| > bash-3.00$ octave < test.m
| > 
| > However, I need to pass a parameter in the function such as
| > 
| > bash-3.00$ octave < test_need_parameter('filename')
| > 
| > This will not work.
| > 
| > How can I pass the parameter to the function in such situation.
| 
| 
| echo "test_need_parameter('filename')" | octave -q

With 2.9.x there is also

  octave --eval "test_need_parameter('filename')"

See also the --persist option if you want to get a prompt after the
argument to --eval is evaluated.

jwe


reply via email to

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