'any' appears broken for integer data types in octave 3.0

Axel von Kamp vonkamp at mpi-magdeburg.mpg.de
Thu Feb 7 08:02:12 CST 2008


Hi,

I have compiled octave version 3.0.0 on 32bit SuSE 10.2.
When I use the 'any' function it gives incorrect output in case the input is 
an integer data type, e.g.

octave:53> any([0 1 2])
ans =  1 # OK
octave:54> any(uint32([0 1 2]))
ans = 0 # Incorrect
octave:55> any(eye(3), 1)
ans =

   1   1   1 # OK

octave:56> any(uint32(eye(3)), 1)
ans =

   0   0   0 # Incorrect

Apparently, 'any' always returns 0 when the input belongs to an integer class 
(at least in all the cases that I have tested).

Best regards
Axel


More information about the Bug-octave mailing list