help-octave
[Top][All Lists]
Advanced

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

Re: beginner: function definition confusion


From: John W. Eaton
Subject: Re: beginner: function definition confusion
Date: Fri, 22 Apr 2005 10:32:08 -0400

On 22-Apr-2005, Jeff Abrahamson <address@hidden> wrote:

| That was it: I didn't understand that I needed to quote the function
| name.  Thanks!

Or, I think you could pass a function handle (i.e., @avg).

| Can anyone motivate for me why the error message would be "blk
| undefined" (from inside avg) rather than "avg not found" or something?

Because arguments are evaluated before they are passed.  If the
argument is a function, it is called.  By quoting the function name,
you are passing the name of the function as a string, which is then
evaluated with feval inside the nlfilter function.

jwe



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