Main Content


(Not Recommended) Convert dataset array to cell array

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.


C = dataset2cell(D)


C = dataset2cell(D) converts the dataset array D to a cell array C. Each variable of D becomes a column in C. If D is an M-by-N array, then C is (M+1)-by-N, with the variable names of D in the first row. If D contains observation names, then C is (M+1)-by-(N+1), with the observation names in the first column.