필터 지우기
필터 지우기

move rows in a matrix

조회 수: 15 (최근 30일)
Ace_ventura
Ace_ventura 2015년 2월 20일
댓글: Ace_ventura 2015년 2월 20일
Guys, I have a Matrix X= [A; B; C; D ; E; a; b; c; d; e ; f] each alphabet represents a row matrix with three columns. I want a Matrix X= [ A; a; b; c; B; d; e; f; C; D; E]. How to do it??

채택된 답변

Stephen23
Stephen23 2015년 2월 20일
편집: Stephen23 2015년 2월 20일
Use MATLAB's rather powerful indexing ability:
X = [...];
X = X([1,6,7,8,2,9,10,11,3,4,5],:);
  댓글 수: 1
Ace_ventura
Ace_ventura 2015년 2월 20일
Thanx Stephen

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

추가 답변 (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