Undefined argument in anonymous functions

John W. Eaton jwe at octave.org
Wed Jun 10 14:58:45 CDT 2009


On  9-Jun-2009, Marco Caliari wrote:

| 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

I checked in the following change.

  http://hg.savannah.gnu.org/hgweb/octave/rev/e12a5ec6cf0d

It may need a little more testing to ensure that I haven't broken
something else, but since the change fixes a regression, it is a
candidate for 3.2.x.

Thanks,

jwe


More information about the Bug-octave mailing list