HOW TO SHIFT COLUMN AND ROW MATRIX

조회 수: 15 (최근 30일)
Wahyu A
Wahyu A 2021년 1월 19일
댓글: Wahyu A 2021년 1월 19일
hy guys. please help me, I dont know to shift column and row in matlab. please see image below. thanks. :)

채택된 답변

Matt J
Matt J 2021년 1월 19일
편집: Matt J 2021년 1월 19일
x=repmat([1 2 3 4],4,1); x(6,6)=0
x = 6×6
1 2 3 4 0 0 1 2 3 4 0 0 1 2 3 4 0 0 1 2 3 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0
perm=[1,2,5,6,3,4];
x(perm,perm),
ans = 6×6
1 2 0 0 3 4 1 2 0 0 3 4 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 3 4 1 2 0 0 3 4
  댓글 수: 3
Matt J
Matt J 2021년 1월 19일
You're welcome, but please Accept-click the answer to indicate that it worked.
Wahyu A
Wahyu A 2021년 1월 19일
Noted sir, thanks for the answer

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by