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 Exchange에서 Resizing 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