Complex nested loops- matrix indexing
이전 댓글 표시
I have a 20x20 matrix, I need to move some elements from a starting index i.e. (6, 3) to an ending index i.e. (17,2) to a new 12x2 matrix in this case.
답변 (1개)
Bruno Luong
2020년 7월 31일
A=randi(10,20,20) % some tes matrix, replace it with yours
B = A(6:1:17, 3:-1:2)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!