struct2cell

Creates a cell from a structure.

Syntax

  • ce = struct2cell(st)

Input argument

  • st - a structure.

Output argument

  • ce - a cell.

Description

ce = struct2cell(st) returns a new cell from the structure.

Example

names = {'Pierre', 'Anna', 'Roberto'}
values =  {45, 42, 13}
st = struct ('name', names, 'age', values);
ce = struct2cell(st)

See also

cell, struct, fieldnames.

History

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated