From cell array to matrix
1 次查看(过去 30 天)
显示 更早的评论
Hello Everyone: I need to convert the variables (10 temperature profiles collected with a CTD) contained inside a cell array (rsk.mat herein attached) to ten single arrays. Please could anyone provide a hint as to how to accomplish this?
Cheers,
Felipe
3 个评论
Adam Danz
2019-12-11
Hi Adam: rsk.data contains the values for the 10 profiles I need to convert to single matrix for each profile.
Thanks,
Felipe
采纳的回答
Adam Danz
2019-12-11
编辑:Adam Danz
2019-12-11
This produces a 100x10 matrix and can be applied to several fields of rsk.data.
tstamp = [rsk.data.tstamp];
For fields that contain non-numeric data,
direction = {rsk.data.direction};
1 个评论
Adam Danz
2019-12-11
Felipe Rios's answer moved here as a comment
Thanks a lot Adam; profiles = [rsk.data.values] is what I needed!
I appreciate your help.
Cheers,
Felipe
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!