Path: Common/General
% Convert a structure into a cell array where columns of the array include both values and fieldnames. For example, the cell a 1 b c 2 b d 3 Becomes x.a = 1 x.b.c = 2; x.b.d = 3; The companion array m is 1 0 0 1 1 0 1 1 0 Where a 1 indicates that the cell is a field name. Where a 1 indicates that the cell is a field name. -------------------------------------------------------------------------- Form: x = Cell2DToStruct( y, m ) -------------------------------------------------------------------------- ------ Inputs ------ y (:) Cell Array ------- Outputs ------- x (:) Structure --------------------------------------------------------------------------
Back to the Common Module page