table2struct
Convert table to structure array
Syntax
S = table2struct(T)
S = table2struct(T, "ToScalar", true)
Input argument
T - a table object
Output argument
S - Structure.
Description
S = table2struct(T) converts the table T into a structure array S, where each variable in T is represented as a field in S.
If T is an m-by-n table, S will be an m-by-1 structure array with n fields.
the output S will not contain any table properties from T.Properties.
S = table2struct(T, "ToScalar", true) converts the table T into a scalar structure S, where each variable in T becomes a field in S.
If T is an m-by-n table, S will contain n fields, and each field will have m rows.
Example
See also
History
Version
Description
1.8.0
initial version
Author
Allan CORNET
Last updated