Create a matrix with specif size

조회 수: 3 (최근 30일)
Guilherme Lopes de Campos
Guilherme Lopes de Campos 2020년 4월 23일
댓글: Ameer Hamza 2020년 4월 23일
Hi MATLAB community,
I have a array with the size (360x1), I would like to organize into a matrix with sizes (30 rows and 12 columns) using the data available on the array, organize sequencially. Which the function I can use for made this?
Thank you very much
Guilherme

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 4월 23일
편집: Ameer Hamza 2020년 4월 23일
See reshape()
B = reshape(A, 30, 12); % A is 360x1 and B is 30x12
It will organize the data column-wise, i.e., fill the first column, then second, and so on.
  댓글 수: 2
Guilherme Lopes de Campos
Guilherme Lopes de Campos 2020년 4월 23일
Thank you very much to help!
I am very grateful,
Guilherme
Ameer Hamza
Ameer Hamza 2020년 4월 23일
I am glad to be of help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by