how to swap this matrix
이전 댓글 표시
i have this column of matrix
Z= 2
4
1
7
9
how to swap this 1 and 2
채택된 답변
추가 답변 (1개)
dpb
2013년 10월 17일
Z(1:3)=flipud(Z(1:3));
Only works because of odd number, of course. In general to swap individual elements will still take the temporary to hold the one element while overwrite the other.
카테고리
도움말 센터 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!