combining three cell array of different sizes

1 Ansicht (letzte 30 Tage)
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan am 7 Jul. 2015
Bearbeitet: Stephen23 am 7 Jul. 2015
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.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 7 Jul. 2015
d = cell(3);
d(:,1) = a;
d(1,2:end) = [b,c];

Weitere Antworten (0)

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by