another indexing bug ?

Jaroslav Hajek highegg at gmail.com
Fri Feb 20 00:33:06 CST 2009


On Fri, Feb 20, 2009 at 7:24 AM, John W. Eaton <jwe at octave.org> wrote:
> On 19-Feb-2009, Kai Habel wrote:
>
> | Hello,
> |
> | with
> | changeset:   8800:f16aafdd99ca
> | tag:         tip
> | user:        John W. Eaton <jwe at octave.org>
> | date:        Wed Feb 18 01:10:43 2009 -0500
> | summary:     __gnuplot_version__.m: don't use regexp to extract version
> | number
> |
> | I see the following behavior:
> |
> | octave:1> X=zeros(2,3,4)
> | octave:2> X(1,1,1)=1
> | X =
> |
> | ans(:,:,1) =
> |
> |    0   0   0
> |    0   0   0
> |
> | ans(:,:,2) =
> |
> |    0   0   0
> |    0   0   0
> |
> | ans(:,:,3) =
> |
> |    0   1   0
> |    0   0   0
> |
> | ans(:,:,4) =
> |
> |    0   0   0
> |    0   0   0
> |
> | As you can see X(1,2,3) is set to 1.
>
> I checked in the following change.  Maybe Jaroslav can comment about
> whether this fix is the right thing to do.
>
>  http://hg.savannah.gnu.org/hgweb/octave/rev/352f111b04ce
>
> jwe
> _______________________________________________

Apparently, yes.
There was an analogous bug in do_index_op (due to copy-paste-adjust method):
http://hg.savannah.gnu.org/hgweb/octave/rev/40ff50ce3052

thanks


-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


More information about the Bug-octave mailing list