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일

1 개 추천

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

Wahyu A
Wahyu A 2021년 1월 19일
Cool. Its works. Thanks a lot😀
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개)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

제품

질문:

2021년 1월 19일

댓글:

2021년 1월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by