필터 지우기
필터 지우기

How to rearrange data in matrix ?

조회 수: 1 (최근 30일)
Pradya Panyainkaew
Pradya Panyainkaew 2017년 12월 18일
댓글: Pradya Panyainkaew 2017년 12월 18일
if I have A=[1:15].
After that, I want to rearrange matrix A to get a result: MyResult=[1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15];
How can I code to get the result like this ?

채택된 답변

Stephen23
Stephen23 2017년 12월 18일
>> A = 1:15;
>> reshape(A,5,3).'
ans =
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
>>
  댓글 수: 1
Pradya Panyainkaew
Pradya Panyainkaew 2017년 12월 18일
Thank you so much...Stephen Cobeldick..^_^

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by