help-octave
[Top][All Lists]
Advanced

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

Re: Scripting question


From: Thorsten Meyer
Subject: Re: Scripting question
Date: Mon, 29 Mar 2004 20:47:50 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

check out the octave documentation about global variables. E.g.:
http://www.octave.org/doc/octave_10.html#SEC67

Thorsten.

John B. Thoo wrote:

Etienne---

On Mar 26, 2004, at 3:32 PM, Etienne Grossmann wrote:

what about:

   function pf (i,d), plot (d(1,:),d(i,:); end

   pf(3,beul)


Note : you can put the 'function' line in a separate file pf.m in
       octave's search path (LOADPATH variable).


That's neat.  Works very nicely.  Thanks.

I tried to simplify your suggestion by hardcoding the filename in the function,

octave:2> function pf (i)
> plot (beul (1,:), beul (i,:));
> end

but then I get the following errors:

octave:3> pf (3)
error: `beul' undefined near line 2 column 7
error: evaluating argument list element number 1
error: called from `pf'

How do I define "beul" to fix the "`beul' undefined" error?  TIA.

---John.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------





-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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