help-octave
[Top][All Lists]
Advanced

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

Re: nlfilter undefined error


From: Liam Groener
Subject: Re: nlfilter undefined error
Date: Mon, 09 May 2011 18:47:40 -0700

Sent from my iPad

On May 9, 2011, at 4:35 PM, Chethan S <address@hidden> wrote:


Hi all!

I have a function written in MATLAB which goes as follows:

function dir(subfn)
...................
fh = eval(['@' subfn]); % Function handles
I2 = uint8(nlfilter(I, [7 7], subfn));
...............

function [gamma] = ew(I)
.........
end

function [gamma] = nw(I)
.........
end

function [gamma] = nd(I)
........
end
end

When I try calling the function as I call it in MATLAB,
octave:4> dir('ew')
I get the following error:

error: `nlfilter' undefined near line 16 column 12
error: evaluating argument list element number 1
error: called from:
error:   /home/chethan/dir.m at line 16, column 4

Do I have to change anything in the nlfilter line or is calling functions/function handles different in Octave? In MATLAB it works fine without any error

nlfilter is part of the image package from Octave-Forge. Do you have that installed?
As I am very new to Octave, I didn't know about it. So I have it installed now. But now I get a different error.

error: feval: function `ew' not found
error: called from:
error:   /usr/local/share/octave/packages/image-1.0.14/nlfilter.m at line 119, column 6
error: evaluating argument list element number 1
error:   /home/chethan/dirvar.m at line 16, column 4

What is the problem now?
Sorry, I missed that in my previous response. Octave does not currently have subfunctions. Move the definitions of ew, nw, and nd to outside of the definition of dr. You should be able to just cut them and then paste them below the dr end statement.

reply via email to

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