How to concatenate elements of cell array

조회 수: 92 (최근 30일)
rob mccutcheon
rob mccutcheon 2017년 5월 12일
댓글: Aswathy 2024년 8월 29일
Dear All,
I have what I expect is a simple problem that I would be most grateful for some help with.
I have a 333x1 cell array. Each of the 333 elements are a numeric array, ranging in dimensions from 49x332 to 49X1.
I would like to concatenate all the elements so that I have a single 49x55611 array.
Many thanks for any advice,
Rob

채택된 답변

Stephen23
Stephen23 2017년 5월 12일
편집: Stephen23 2017년 5월 12일
Where C is your cell array:
[C{:}]
or
horzcat(C{:})
For more info on how this works, read about comma separated lists:

추가 답변 (1개)

KL
KL 2017년 5월 12일
cell2mat(YourCellArray)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by