help-octave
[Top][All Lists]
Advanced

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

Re: quadrature of funct. with parameters


From: Przemek Klosowski
Subject: Re: quadrature of funct. with parameters
Date: Fri, 17 Mar 2006 15:41:07 -0500 (EST)

In the following snippet, two direct invocations of f2 (lines 2 and 3) work,
but the last line doesn't:

   f2 = @(x) f1(x,2);
   f2 (2)
   f2 (3)
   quad ('f2',0,1)

I think that is because f2 is a local variable and therefore it is unknown 
within quad.
This is not a problem for non-anonymous functions because they are global by 
default,
I think. The right fix would probably be to define the function name as global  
in the
bowels of quad. Does it make sense?



-------------------------------------------------------------
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]