How to convert an array into matrix of different sized cloumns
Afficher commentaires plus anciens
i want to convert an array just like this suppose A is my array
A=[1 3 5 5 7 8 9 34 34 45 67 78 43 32 23] and i want to convert it into a matrix b which has random number of rows in each column(suppose n number of columns) b=[1 3 5 5 7; 8 9 ;34 34 45 67 78 43 32; 23]
Réponse acceptée
Plus de réponses (1)
Wayne King
le 23 Oct 2011
0 votes
Hi, you would have to do this as a cell array unless you were content to fill out the "missing" elements in the rows with NaN or zeros.
1 commentaire
dexter
le 23 Oct 2011
Catégories
En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!