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 件のコメント
sama
sama 2018 年 5 月 17 日
Thanks a lot

サインインしてコメントする。

その他の回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2018 年 5 月 17 日
A=magic(3);
B=A(:,[3 2 1])
or
B=A(:,[end:-1:1])

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by