Flip matrix by every nth row

4 ビュー (過去 30 日間)
David du Preez
David du Preez 2017 年 4 月 12 日
編集済み: Stephen23 2017 年 4 月 12 日
I have a 121x14 matrix. I want to flip the first 11 rows vertically and repeat so on for the rest of the matrix. I know it is possible to flip an entire matrix using:
flipup(name)

採用された回答

Stephen23
Stephen23 2017 年 4 月 12 日
編集済み: Stephen23 2017 年 4 月 12 日
This is MATLAB, so just generate the indices:
idx = reshape(flipud(reshape(1:121,11,11)),1,121);
mat(idx,:)
These indices only need to be generated once, and can be used multiple times.

その他の回答 (0 件)

カテゴリ

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