how can i completely remove the first 110 rows and the last 70 in a (500*1) matrix? for example is this correct? A(1:110, : ) = [ ] A (430:500, : ) = [ ] Is there a way to combine the two?

 채택된 답변

Voss
Voss 2023년 1월 10일

0 개 추천

A([1:110 end-69:end],:) = [];
(Also, note that 430:500 is 71 elements, not 70.)

댓글 수: 2

Alessandro Camillo
Alessandro Camillo 2023년 1월 10일
what if instead I have to completely remove the first 110 rows and the last one in a matrix (500*1)? A([1:110 end-1],:) = []; or A([1:110 end],:) = [];
Voss
Voss 2023년 1월 10일
Use "end" to refer to the last row. "end-1" refers to the next-to-last row.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Dynamic System Models에 대해 자세히 알아보기

질문:

2023년 1월 10일

댓글:

2023년 1월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by