struct2table
Convert structure array to table
Description
converts a
structure array to a table. Each field of the input structure becomes a variable in
the output table.T = struct2table(S)
If the input is:
A scalar structure with
nfields, all of which havemrows, then the output is anm-by-ntable.(For a scalar structure whose fields have different numbers of rows, use the
AsArrayname-value argument in the next syntax.)An
m-by-1 or 1-by-mstructure array withnfields, then the output is anm-by-ntable. Each structure provides values for a corresponding row of the output table.
specifies options using one or more name-value arguments in addition to the input
argument in the previous syntax.T = struct2table(S,Name=Value)
For example, you can force struct2table to treat the input as
a structure array by setting AsArray to true.
If the input is a scalar structure, then the output is a one-row table.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2013b