Bug? In Octave 3.0.X for Mac OS X

Ben Abbott bpabbott at mac.com
Mon Sep 1 14:24:12 CDT 2008


On Sep 1, 2008, at 3:01 PM, Glenn Eychaner wrote:

> Please, never mind.  Here's the really lame offending line:
>
> On Sep 1, 2008, at 2:35 PM, Glenn Eychaner wrote:
>
>> 	[ min, midx ] = min(abs(adates - pdates(n)));
>
> I'm an idiot, aren't I?  (Though I have to say that Octave sure tries
> its best to handle overriding a built-in function with a variable name
> really, really badly.)

You did find the problem. Switch "min" to "minx" and your function  
will be fine.

If you weren't using "min" as both a variable *and* a function it  
would have worked.

I noticed the answer your example gives the correct answer in spite of  
the syntax problem.

Kudos to jwe, I suppose ;-)

Ben



More information about the Bug-octave mailing list