help-octave
[Top][All Lists]
Advanced

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

struct behaves differenly in octave and matlab


From: david
Subject: struct behaves differenly in octave and matlab
Date: Mon, 4 May 2009 08:23:52 -0700 (PDT)

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


      



reply via email to

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