How to make Triu in reverse axis for triangular matrices ?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ramesh Bala
am 2 Dez. 2020
Kommentiert: Ramesh Bala
am 2 Dez. 2020
The function triu makes the upper triangular matrix in the shape of L . How shall I reverse it like to make it run in opposite diirection.
The below function make triu in the top to bottom,i wanna to make it bottom to top and thus reversing it ?
A = ones(6);
idx = ( A(:,3:end) );
A(:,3:end) = triu(idx,-1)
0 Kommentare
Akzeptierte Antwort
John D'Errico
am 2 Dez. 2020
Are you asking to do no more than this?
A = magic(6)
A = flip(tril(flip(A)))
That is a simple way to do it. There would be others.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!