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

1 view (last 30 days)
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)

Accepted Answer

Matt J
Matt J on 16 Feb 2021
final_data = cell2mat(data(:))

More Answers (0)

Categories

Find more on Cell Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!