Data Types

Grouping variables, categorical arrays, and dataset arrays

Statistics and Machine Learning Toolbox™ provides two additional data types. Work with ordered and unordered discrete, nonnumeric data using the nominal and ordinal data types. Store multiple variables, including those with different data types, into a single object using the dataset array data type. However, these data types are unique to Statistics and Machine Learning Toolbox. For greater cross-product compatibility, use the categorical or table data types, respectively, available in MATLAB®. For more information see Create Categorical Arrays, Create a Table, or watch Tables and Categorical Arrays.


Categorical Arrays

nominal Create nominal array
ordinal Create ordinal array
dummyvar Create dummy variables
grpstats Summary statistics organized by group
gplotmatrix Matrix of scatter plots by group
grp2idx Create index vector from grouping variable
gscatter Scatter plot by group

Dataset Arrays

mat2dataset Convert matrix to dataset array
cell2dataset Convert cell array to dataset array
struct2dataset Convert structure array to dataset array
table2dataset Convert table to dataset array
dataset2cell Convert dataset array to cell array
dataset2struct Convert dataset array to structure
dataset2table Convert dataset array to table
export Write dataset array to file
grpstats Summary statistics organized by group
ismissing Find dataset array elements with missing values
join Merge observations

Using Objects

nominal Arrays for nominal data
ordinal Arrays for ordinal data


dataset Arrays for statistical data
Was this topic helpful?