How to arrange a Matrix in different shape?

조회 수: 1 (최근 30일)
sama
sama 2018년 5월 17일
댓글: sama 2018년 5월 17일
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

채택된 답변

Paolo
Paolo 2018년 5월 17일
B = fliplr(A)

추가 답변 (1개)

Fangjun Jiang
Fangjun Jiang 2018년 5월 17일
A=magic(3);
B=A(:,[3 2 1])
or
B=A(:,[end:-1:1])

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by