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 ExchangeDynamic 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