how to concatenate all the cell values horizondally in matlab

조회 수: 13 (최근 30일)
navan
navan 2016년 4월 3일
댓글: navan 2016년 4월 3일
I have a cell array
{[1;1;1] [2;2] [3;3;3;3] }
I want to convert the cell array into a single vector
[1,1,1,2,2,3,3,3,3]
Kindly help.

채택된 답변

per isakson
per isakson 2016년 4월 3일
편집: per isakson 2016년 4월 3일
One way
>> cac = {[1;1;1] [2;2] [3;3;3;3] };
>> cat( 1, cac{:} )'
ans =
1 1 1 2 2 3 3 3 3

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by