Minor indexing incompatibility

Moritz Borgmann octave at moriborg.de
Sat May 3 16:23:39 CDT 2008


I've found the following minor indexing incompatibility:

A = ones(2, 3, 4);
B = A(1,:)

gives

ans =

      1     1     1     1     1     1     1     1     1     1     1     1

as expected in both Octave and Matlab. However,

B = A(1,1:end)

gives the same in Matlab, as expected, but

ans =

    1   1   1

in Octave (current hg default branch).

Cheers,

Moritz


More information about the Bug-octave mailing list