could anyone help me to rearrange the matrix in the required manner.
조회 수: 1 (최근 30일)
이전 댓글 표시
I ma having a matrix A=[ 1 0 0 0;
2 0 0 0;
3 4 0 0;
5 6 7 0]
i need to rearrange the matrix in the following manner
A=[1 2 3 5;
0 0 4 6;
0 0 0 7;
0 0 0 0]
댓글 수: 0
채택된 답변
Bruno Luong
2019년 9월 11일
댓글 수: 4
Bruno Luong
2019년 9월 12일
편집: Bruno Luong
2019년 9월 12일
I can only see one thing that you want beside A.' (but why don't you tell use what is the desired output)?
x = 1:min(size(A));
A(x,x) = A(x,x).'
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!