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개)

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