Deleting every n rows in matrix

2 ビュー (過去 30 日間)
Niet hier
Niet hier 2021 年 4 月 13 日
コメント済み: Niet hier 2021 年 4 月 14 日
I have a matrix of m x n
I want to keep the first row and then delete 14 rows and then preserve the 16th row, then delete the next 14 rows and preserve the 31th row.
What is the best way to do this?

採用された回答

David Hill
David Hill 2021 年 4 月 13 日
編集済み: David Hill 2021 年 4 月 13 日
newMatrix=oldMatrix(1:15:end,:);
  1 件のコメント
Niet hier
Niet hier 2021 年 4 月 14 日
thanks

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

その他の回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2021 年 4 月 13 日
A=1:100
A=A(1:15:end)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by