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 tableT into a structure array S, where each variable inT 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 fromT.Properties.
S = table2struct(T, "ToScalar", true) converts the tableT into a scalar structure S, where each variable inT 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
Last updated
Was this helpful?