Convert cell array to an array, when the size of the cells is different
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Nikolas Spiliopoulos
le 4 Déc 2018
Commenté : Nikolas Spiliopoulos
le 4 Déc 2018
Hi all,
I have a cell array like this A={ [0 0 0 0] ; [1 1] ;[2] }
Is it possible to convert it in an array? I tried with cell2mat but I get an error because the sizes are different
thanks
Nikolas
0 commentaires
Réponse acceptée
Plus de réponses (1)
madhan ravi
le 4 Déc 2018
[A{:}] % which is eqivalent to horzcat(A{:})
3 commentaires
madhan ravi
le 4 Déc 2018
Modifié(e) : madhan ravi
le 4 Déc 2018
just give an example of your desired output in the example you gave! plus how can you put them in an array when the number of columns are different??
Voir également
Catégories
En savoir plus sur Data Type Conversion dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!