converting numbers to matrix(matrix formation)

2 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Data Type Conversion in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by