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: Tom Holroyd (NIH/NIMH) [E]
Subject: Re: how to parse function parameter in octave?
Date: Fri, 29 Sep 2006 15:46:31 -0400
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929)

bash-3.00$ octave < test_need_parameter('filename')
How can I pass the parameter to the function in such situation.

Put "#! /usr/local/bin/octave -q" at the top of test.m (using the correct path to octave, 
say "which octave" to find out). Then do

$ chmod +x test.m

$ test.m filename

in test.m, argv() returns the command line arguments.

--
Tom Holroyd, Ph.D.
We experience the world not as it is, but as we expect it to be.


reply via email to

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