how to treat dataset as matrix
显示 更早的评论
How to treat dataset as a matrix, then I can do sum, diff, time, as the matrix, all the data in the dataset are numerical data.
1 个评论
Ahmed A. Selman
2013-4-20
The dataset comes from a file or some input device.. or user input function? Each of these (and others) has it's own method to convert data to matrix.
回答(2 个)
Aasim
2014-2-4
1 个投票
But the cells should be of the same type. if they are different this gives error... how to do this for different types of data in the cells?
ARS
2013-4-20
If you are talking about converting a dataset array then this might be a possible solution.
First convert your dataset array to cell array using:
C = dataset2cell(D)
and then convert that cell array to simple matrix using:
A= cell2mat(C)
Hope this helps.
AMD.
类别
在 帮助中心 和 File Exchange 中查找有关 Managing Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!