Clear Filters
Clear Filters

converting numbers to matrix(matrix formation)

3 views (last 30 days)
If I am having some numbers, e.g
x=[ 12 12 12 2 2 2 2 3 3 ];
and now I want to convert into a matrix of 3 * 3.
Which MATLAB function is suitable for this?

Accepted Answer

Roger Stafford
Roger Stafford on 28 Apr 2015
Use the 'reshape' function.

More Answers (0)


Find more on Data Type Conversion 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!