A simple matrix question
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Rengin
am 5 Aug. 2019
Beantwortet: madhan ravi
am 5 Aug. 2019
%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
0 Kommentare
Akzeptierte Antwort
Joel Handy
am 5 Aug. 2019
A = [1 2 3 4 5];
B = fliplr(A) % Flip matrix in left/right direction
A = [1; 2; 3; 4; 5];
B = flipud(A) % Flip matrix in up/down direction
0 Kommentare
Weitere Antworten (3)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices 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!