combining three cell array of different sizes

조회 수: 1 (최근 30일)
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan 2015년 7월 7일
편집: Stephen23 2015년 7월 7일
I have three cell arrays:
a = {'ball' ; 'cake' ; 'ice'}
b = {'home'}
c = {'car'}
I know if I use d =[a , b, c] will get the error.
how can I combine these arrays. The output should be another array so that it will be easy to write into excel.
Thanks a lot.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2015년 7월 7일
d = cell(3);
d(:,1) = a;
d(1,2:end) = [b,c];

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by