combining three cell array of different sizes

1 次查看(过去 30 天)
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 中查找有关 Data Types 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by