Deleting every n rows in matrix

2 visualizzazioni (ultimi 30 giorni)
Niet hier
Niet hier il 13 Apr 2021
Commentato: Niet hier il 14 Apr 2021
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?

Risposta accettata

David Hill
David Hill il 13 Apr 2021
Modificato: David Hill il 13 Apr 2021
newMatrix=oldMatrix(1:15:end,:);

Più risposte (1)

Fangjun Jiang
Fangjun Jiang il 13 Apr 2021
A=1:100
A=A(1:15:end)

Categorie

Scopri di più su Data Types in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by