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

조회 수: 28(최근 30일)
mankang 16 Feb 2021
댓글: mankang 18 Feb 2021
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 16 Feb 2021
final_data = cell2mat(data(:))
##### 댓글 수: 1표시숨기기 없음
mankang 18 Feb 2021
Tanks!!! MJ.

댓글을 달려면 로그인하십시오.

### Community Treasure Hunt

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

Start Hunting!

Translated by