could anyone help me to rearrange the matrix in the required manner.
4 次查看(过去 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!