[major] struct array indexing in tip

Jaroslav Hajek highegg at gmail.com
Mon Jan 19 07:24:16 CST 2009


On Mon, Jan 19, 2009 at 3:45 AM, Nicholas Tung <ntung at ntung.com> wrote:
> in revision
> hg tip
> changeset:   8534:0eb83938c8bc
>
> struct indexing is messed up. The following code should simply add to the
> value of c at 2, but creates some weird cell array...
> octave:1> a.c = [1, 2, 3]
> a =
> {
>   c =
>      1   2   3
> }
> octave:2> e = [a, a]
> e =
> {
>   1x2 struct array containing the fields:
>     c
> }
> octave:3> e(1).c(2)
> ans =  2
> octave:4> e(1).c(2) += 1
> e =
> {
>   1x2 struct array containing the fields:
>     c
> }
> octave:5> e.c
> ans =
> {
>   [1,1] =
>      1   2   3
>   [1,2] =  3
> }
> ans =
>    1   2   3
>
> Thanks in advance; please tell me when it's fixed.
>
> cheers,
> Nicholas
>
> _______________________________________________
> Bug-octave mailing list
> Bug-octave at octave.org
> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>
>

Looking at this, I see that there are a couple more other bugs. I'll
see what can be done.

cheers


-- 
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