combine elements of cell arrays

1 vue (au cours des 30 derniers jours)
lucksBi
lucksBi le 13 Avr 2017
Commenté : lucksBi le 13 Avr 2017
i want 2 know that how can i combine elements of cell arrays in new cell array. e.g elements of a{1,1}{1,1} b{1,1}{1,1} c{1,1}{1,1} are shown on same row of new cell array.

Réponse acceptée

Philip G
Philip G le 13 Avr 2017
You might try the MATLAB functions horzcat and vertcat. For example:
a{1,1}{1,1}=123;
b{1,1}{1,1}=123;
horzcat(a{1,1}{1,1},b{1,1}{1,1}) % this gives you the cell content in one row
horzcat(a{1,1},b{1,1}) % this gives you a cell array of one row
Hope this helps somehow ;)
  1 commentaire
lucksBi
lucksBi le 13 Avr 2017
yea i hv realized that right after posting question. thanks Alot :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by