Undefined argument in anonymous functions

Marco Caliari marco.caliari at univr.it
Tue Jun 9 08:45:19 CDT 2009


Dear maintainers,

I noticed that

octave:1> g=@(t)quadl(@(x)(t*x),0,1);

gives

octave:2> g(0.5)
error: `t' undefined near line 1 column 18
error: called from:
error:    at line -1, column -1
error:   /usr/local/share/octave/3.2.0/m/general/quadl.m at line 93, 
column 5
error:    at line -1, column -1

in Octave 3.2.0, whereas it works in Octave 3.0.5

octave-3.0.5:2> g(0.5)
ans =  0.25000

Best regards,

Marco


More information about the Bug-octave mailing list