How to convert an array into matrix of different sized cloumns
Show older comments
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]
Accepted Answer
More Answers (1)
Wayne King
on 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.
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!