Remove multiple elements from array based on location

5 ビュー (過去 30 日間)
Kunal Tiwari
Kunal Tiwari 2018 年 9 月 24 日
編集済み: Stephen23 2018 年 9 月 24 日
I have an array 54335x15 double. I want to remove certain elements from the array. for example I want to remove elements corresponding to index 25832 to 26450 and then those 30050 to 30750. is there any way to do it ?
also one of the column in the array is time, is there any way to remove data for a selected time from the entire array ?

採用された回答

Stephen23
Stephen23 2018 年 9 月 24 日
編集済み: Stephen23 2018 年 9 月 24 日
Where M is your matrix:
M([25832:26450,30050:30750],:) = []
" is there any way to remove data for a selected time from the entire array"
Use logical indexing:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by