octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #50622] missing function struct2array (mainly


From: Rik
Subject: [Octave-bug-tracker] [bug #50622] missing function struct2array (mainly structtocell wrapper)
Date: Fri, 24 Mar 2017 18:59:37 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #1, bug #50622 (project octave):

Can you check whether struct2array is in core Matlab or only in a toolbox by
running the following in Matlab?


which struct2array


Also, what does Matlab do if the struct contains double entries that have
different sizes?


clear x
x.a = 1;
x.b = magic (3);
y = struct2array (x)


What about non-double entries?  Does it ignore them, produce an error,
something else?  Here is some test code


clear x
x.a = 1;
x.b = {"Cell", "Array"};
x.c = 2;
y = struct2array (x)


What is the shape of the resulting array?  Does it mirror the input struct or
is it something different?


clear x
x(1,1).a = 1;
x(1,2).a = 2;
x(2,1).a = 3;
x(2,2).a = 4;
y = struct2array (x)
size (y)


How are null values handled?  Are they converted to 0 or skipped?


clear x
x(1).a = 1;
x(3).a = 3;
y = struct2array (x)
size (y)




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50622>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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