How can i flip a (M x N) matrix to (N x M)?

13 ビュー (過去 30 日間)
Alex Brown
Alex Brown 2017 年 7 月 5 日
編集済み: Astik Sachan 2017 年 7 月 5 日
i want to reverse the columns and lines in a matrix how can i do it?

採用された回答

Astik Sachan
Astik Sachan 2017 年 7 月 5 日
編集済み: Astik Sachan 2017 年 7 月 5 日
There are two ways to do it:-
A = [1 ,2 ; 3, 4] ;
Flipped_A = transpose(A) ;
2. Put a single-quote to the end of variable
A = [1 ,2 ; 3, 4] ;
Flipped_A = A' ;

その他の回答 (1 件)

Torsten
Torsten 2017 年 7 月 5 日
https://de.mathworks.com/help/matlab/ref/transpose.html
Best wishes
Torsten.

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by