필터 지우기
필터 지우기

how to divide a matrix into groups

조회 수: 2 (최근 30일)
farfar
farfar 2018년 10월 14일
편집: madhan ravi 2018년 10월 14일
Hello I have a matrix lets say with 12by1.
A=[0;0.2;0.25;0.3;1;1.5;4;4.75;5;6;9;10]
how can i group this matrix into 3 equal (4by1) matrices like: a=[0;0.2;0.25;0.3] b=[1;1.5;4;4.75] c=[5;6;9;10]
Thank you.

채택된 답변

madhan ravi
madhan ravi 2018년 10월 14일
편집: madhan ravi 2018년 10월 14일
A=[0;0.2;0.25;0.3;1;1.5;4;4.75;5;6;9;10]
A=reshape(A,4,3)
a=A(:,1)
b=A(:,2)
c=A(:,3)
  댓글 수: 1
madhan ravi
madhan ravi 2018년 10월 14일
편집: madhan ravi 2018년 10월 14일
Make sure to accept the answer if it worked.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by