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 Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by