converting numbers to matrix(matrix formation)

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?

 採用された回答

Roger Stafford
Roger Stafford 2015 年 4 月 28 日

1 投票

Use the 'reshape' function.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeResizing and Reshaping Matrices についてさらに検索

質問済み:

2015 年 4 月 28 日

回答済み:

2015 年 4 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by