Deleting every n rows in matrix

2 次查看(过去 30 天)
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 个)

Fangjun Jiang
Fangjun Jiang 2021-4-13
A=1:100
A=A(1:15:end)

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by