Class: dataset
(Not Recommended) Convert dataset array to structure
The dataset
data type is not recommended. To work with heterogeneous data,
use the MATLAB®
table
data type instead. See MATLAB
table
documentation for more information.
S = dataset2struct(D)
S = dataset2struct(D,'AsScalar',true)
converts a dataset array to a structure array. Each variable of S
= dataset2struct(D
) D
becomes a field in S
. If D
is an
M-by-N dataset array, then
S
is M-by-1 and has N
fields. If D
contains observation names, then
S
contains those names in the additional field
ObsNames
.
converts a dataset array to a scalar structure. Each variable of S
= dataset2struct(D
,'AsScalar',true)D
becomes a field in S
. If D
is an
M-by-N dataset array, then
S
has N fields, each of which as
M rows. If D
contains observation names,
then S
contains those names in the additional field
ObsNames
.
|
M-by-N dataset array. |
|
M-by-1 structure array, with N
fields. If the input dataset array contains observation names, then
If you specify |