Bulk concatenation of cell array contents (without looping)?
이전 댓글 표시
Hi,
I have a 1x4 cell whose elements are all 1x40 cells. Each of the elements of the 1x40 cells is a 1000x128 array of doubles.
Is there a way to concatenate the contents of the elements in the 1x40 cells into a 40000x128 array of doubles without looping through the elements individually?
Thanks, Alex
채택된 답변
추가 답변 (2개)
Ramis Rafay
2017년 7월 23일
0 개 추천
I think this will work for any given number of elements without looping
stackedarrays = vertcat(mycell{:,:})
댓글 수: 1
theblueeyeswhitedragon
2018년 6월 27일
편집: theblueeyeswhitedragon
2018년 6월 27일
This gives you back a mxn matrix, which you could easily obtain by using cell2mat().
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!