Would you let me know one of the fastest (or the most efficient) ways to merge data?

1 次查看(过去 30 天)
data =
5x12 double 1x12 double 1x12 double 1x12 double 2x12 double 2x12 double 2x12 double 1x12 double 1x12 double 3x12 double
3x12 double 1x12 double 1x12 double 1x12 double 1x12 double 1x12 double 1x12 double 1x12 double 1x12 double 3x12 double
1x12 double 1x12 double 1x12 double 1x12 double 1x12 double 1x12 double 1x12 double 1x12 double 1x12 double 2x12 double
7x12 double 2x12 double 1x12 double 1x12 double 3x12 double 3x12 double 1x12 double 1x12 double 1x12 double 3x12 double
5x12 double 1x12 double 1x12 double 1x12 double 2x12 double 1x12 double 1x12 double 1x12 double 1x12 double 3x12 double
3x12 double 1x12 double 1x12 double 1x12 double 2x12 double 1x12 double 1x12 double 1x12 double 1x12 double 3x12 double
....
ex)
the cell size of the data is 6 X 10, and each cell contains an 1X12 array with a random number that ranges from 1 to 1000.
cell data merge to final_data(6*10*(1~1000), 12)
I would like to merge the data in a way that results in a matrix of size n x 12 .
Please tell me the fastest way. (ex : spmd, parfor, cellfun, etc)

采纳的回答

Matt J
Matt J 2021-2-16
final_data = cell2mat(data(:))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Cell Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by