Stijn
2007-04-29 16:33:11 UTC
Hi,
I was trying to run following m-files (working fine in Matlab) in
Octave but I got a error that I could not fix. The files in question
can be found at http://faculty.smu.edu/lshampin/hpde.zip ; And the
example used was RIM.m
The error is:
error: PDEFUN does not agree with FORM.
error: evaluating if command near line 104, column 1
error: called from `setup' in file `/home/stijn/hpde/examples/setup.m'
error: evaluating assignment expression near line 52, column 5
error: called from `RIM' in file `/home/stijn/hpde/examples/RIM.m'
The part of the code in setup.m is:
input_OK = true;
switch form
case {1,3}
input_OK = isa(pdefun,'function_handle');
case 2
if isa(pdefun,'cell')
if length(pdefun) == 2
input_OK = isa(pdefun{1},'function_handle') && ...
( isa(pdefun{2},'function_handle') || ...
isnumeric(pdefun{2}) );
else
input_OK = false;
end
else
input_OK = false;
end
end
if ~input_OK
error('PDEFUN does not agree with FORM.')
end
AFAIK there is not a function that could make any difference between
Matlab and Octave. Does someone see a difference?
Thanks in advance,
Stijn
I was trying to run following m-files (working fine in Matlab) in
Octave but I got a error that I could not fix. The files in question
can be found at http://faculty.smu.edu/lshampin/hpde.zip ; And the
example used was RIM.m
The error is:
error: PDEFUN does not agree with FORM.
error: evaluating if command near line 104, column 1
error: called from `setup' in file `/home/stijn/hpde/examples/setup.m'
error: evaluating assignment expression near line 52, column 5
error: called from `RIM' in file `/home/stijn/hpde/examples/RIM.m'
The part of the code in setup.m is:
input_OK = true;
switch form
case {1,3}
input_OK = isa(pdefun,'function_handle');
case 2
if isa(pdefun,'cell')
if length(pdefun) == 2
input_OK = isa(pdefun{1},'function_handle') && ...
( isa(pdefun{2},'function_handle') || ...
isnumeric(pdefun{2}) );
else
input_OK = false;
end
else
input_OK = false;
end
end
if ~input_OK
error('PDEFUN does not agree with FORM.')
end
AFAIK there is not a function that could make any difference between
Matlab and Octave. Does someone see a difference?
Thanks in advance,
Stijn