help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: struct behaves differenly in octave and matlab


From: Jaroslav Hajek
Subject: Re: struct behaves differenly in octave and matlab
Date: Mon, 4 May 2009 17:36:32 +0200

On Mon, May 4, 2009 at 5:23 PM, david <address@hidden> wrote:
>
> Hi,
>
>  When I use Octave to do the following:
>
> octave:67> a.b=[]
> a =
> {
>  b = [](0x0)
> }
>
> octave:68> a.b.c.d=1;
> error: matrix cannot be indexed with .
> error: evaluating assignment expression near line 68, column 8
>
>
> The same code in Matlab:
>>> a.b=[]
>
> a =
>
>    b: []
>
>>> a.b.c.d=1;
>>> a.b.c
>
> ans =
>
>    d: 1
>
>
>  My question is: How can we get the same result from Octave to match the 
> result in Matlab?
>
>  Thank you so much!
>
> David
>
>
>

This works in 3.1.55.

cheers


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]