How to arrange a Matrix in different shape?

1 Ansicht (letzte 30 Tage)
sama
sama am 17 Mai 2018
Kommentiert: sama am 17 Mai 2018
Hello, I have a very simple question but cannot find the answer now. Imagine I have a matrix A=[a b c], is there any function to make it B=[c b a]? Thanks

Akzeptierte Antwort

Paolo
Paolo am 17 Mai 2018
B = fliplr(A)

Weitere Antworten (1)

Fangjun Jiang
Fangjun Jiang am 17 Mai 2018
A=magic(3);
B=A(:,[3 2 1])
or
B=A(:,[end:-1:1])

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!

Translated by