error assigning value to multi-dim struct

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

error assigning value to multi-dim struct

rdzman
I'm guessing this is a bug. The latest version I have to test this on is 3.4.0, so I'm not sure if it's still an issue in the latest. Starting with a and b undefined ...

octave-3.4.0:3> a(1,1,1).b(1) = 2;
octave-3.4.0:4> a(1,1,1).b(1) = 3;
error: a cs-list cannot be further indexed
error: assignment to structure element failed
error: assignment failed, or no method for `scalar struct = scalar'

I think it's related to the singleton dimensions ...

octave-3.4.0:4> a(1,1,2).b(1) = 2;
octave-3.4.0:5> a(1,1,1).b(1) = 2;

... works just fine.

-- 
Ray Zimmerman
Senior Research Associate
419A Warren Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645




Reply | Threaded
Open this post in threaded view
|

Re: error assigning value to multi-dim struct

Jordi Gutiérrez Hermoso-2
On 14 March 2012 13:24, Ray Zimmerman <[hidden email]> wrote:
> I'm guessing this is a bug.

    http://www.gnu.org/software/octave/bugs.html

HTH,
- Jordi G. H.
Reply | Threaded
Open this post in threaded view
|

Re: error assigning value to multi-dim struct

rdzman
Oops, sorry, missed that ... I've filed a bug report.

   Ray

On Mar 14, 2012, at 1:26 PM, Jordi Gutiérrez Hermoso wrote:

> On 14 March 2012 13:24, Ray Zimmerman <[hidden email]> wrote:
>> I'm guessing this is a bug.
>
>    http://www.gnu.org/software/octave/bugs.html
>
> HTH,
> - Jordi G. H.
>