A simple matrix question
Mostrar comentarios más antiguos
%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
Respuesta aceptada
Más respuestas (3)
Alex Mcaulley
el 5 de Ag. de 2019
sort(A,'descend')
Torsten
el 5 de Ag. de 2019
0 votos
fliplr(A)
madhan ravi
el 5 de Ag. de 2019
B = flip(A)
Categorías
Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!