No subject
Mon Mar 21 21:14:43 UTC 2011
[map]
***** test
assert(map(@min,[1 2 3 4 5],[5 4 3 2 1]), [1 2 3 2 1])
assert(map(@min,rand(1,5),[0 0 0 0 0]), [0 0 0 0 0])
assert(map(@(x,y) (sin(x).^2 + cos(y).^2),-pi:0.5:+pi,-pi:0.5:+pi),ones(1,13))
!!!!! test failed
assert (map (@(x, y) (sin (x) .^ 2 + cos (y) .^ 2);
, -pi:0.5:+pi, -pi:0.5:+pi),ones (1, 13)) expected
1 1 1 1 1 1 1 1 1 1 1 1 1
but got
1 1 1 1 1 1 1 1 1 1 1 1 1
The problem is that Octave 3.2 isn't consistent in what ones() returns:
...
GNU Octave, version 3.2.4
...
octave:1> typeinfo(ones(1,13))
ans = range
octave:2> typeinfo(ones(2,13))
ans = matrix
I don't have the build power on my notebook to build 3.4. Can you check wether
this has changed there?
Thanks
Thomas
More information about the Pkg-octave-devel
mailing list