struct2cell creates trailing singleton dimension

David Bateman dbateman at dbateman.org
Tue Apr 7 18:38:10 CDT 2009


The struct2cell function creates a trailing singleton dimension when the 
struct array it is call with is scalar or a column vector For example

a.fld1 = 1;
a.fld2 = 2;
b = struct2cell(a);
size (b)
a(2).fld1 = 3;
a(2).fld2 = 4;
c = struct2cell(a);
size(c)
d = struct2cell(a.');
size(d)

The attached patch addresses this, though I can't easily apply the patch 
at the moment, so if someone else wants to  I'd appreciate it..

D.

-- 
David Bateman                                dbateman at dbateman.org
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.struct2cell
Url: https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20090408/a4d7cd94/attachment.ksh 


More information about the Octave-maintainers mailing list