A simple matrix question
Ältere Kommentare anzeigen
%Dear users,
%Imagine that I have a matrix of A=[1,2,3,4,5]
%Is there any short-cut to get the matrix of B=[5,4,3,2,1]?
%Thanks in advance
Akzeptierte Antwort
Weitere Antworten (3)
Alex Mcaulley
am 5 Aug. 2019
sort(A,'descend')
Torsten
am 5 Aug. 2019
0 Stimmen
fliplr(A)
madhan ravi
am 5 Aug. 2019
B = flip(A)
Kategorien
Mehr zu Matrices and Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!