How can I get the secondary diagonal of a matrix?
87 views (last 30 days)
Show older comments
Antonio Modugno
on 27 Oct 2020
Commented: Antonio Modugno
on 27 Oct 2020
for exaple:
A=rand(5,5)
diag(A)= main diagonal of matrix A
I want to take the elements A(1,5), A(2,4), A(3,3), A(4,2), A(5,1), (secondary diagonal), and put those ones into a vector without picking each element
0 Comments
Accepted Answer
See Also
Categories
Find more on Operating on Diagonal Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!