A simple matrix question
Mostra commenti meno recenti
%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
Risposta accettata
Più risposte (3)
Alex Mcaulley
il 5 Ago 2019
sort(A,'descend')
Torsten
il 5 Ago 2019
0 voti
fliplr(A)
madhan ravi
il 5 Ago 2019
B = flip(A)
Categorie
Scopri di più su Matrices and Arrays in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!