A simple matrix question
Afficher commentaires plus anciens
%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
Réponse acceptée
Plus de réponses (3)
Alex Mcaulley
le 5 Août 2019
sort(A,'descend')
Torsten
le 5 Août 2019
0 votes
fliplr(A)
madhan ravi
le 5 Août 2019
B = flip(A)
Catégories
En savoir plus sur Matrices and Arrays dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!