Structures - MATLAB & Simulink (original) (raw)

Arrays with named fields that can contain data of varying types and sizes

A structure array is a data type that groups related data using data containers called fields. Each field can contain any type of data. Access data in a structure using dot notation of the formstructName.fieldName. For more information, see Structure Arrays or watch Introducing Structures and Cell Arrays.

Functions

struct Structure array
fieldnames Field names of structure, or public fields of Java or Microsoft COM object
getfield Field of structure array
isfield Determine if input is structure array field
isstruct Determine if input is structure array
orderfields Order fields of structure array
rmfield Remove fields from structure
setfield Assign value to structure array field
arrayfun Apply function to each element of array
structfun Apply function to each field of scalar structure
table2struct Convert table to structure array
struct2table Convert structure array to table
cell2struct Convert cell array to structure array
struct2cell Convert structure to cell array

Topics