swap x and y axis in a matrix
44 ビュー (過去 30 日間)
古いコメントを表示
I would like to swap x and y axis in a matrix with n rows and two columns.
I have [r1 r2] and I would like to convert it to [r2 r1]
Thanks in advance for any answers!
0 件のコメント
採用された回答
Jos (10584)
2016 年 5 月 31 日
M = [1 10 ; 2 20 ; 3 30]
Mnew = M(:,[2 1]) % by far the easiest
New = fliplr(M)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Axis Labels についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!