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

1 visualizzazione (ultimi 30 giorni)
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)

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Cell Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by