Index timetable variables and remove rows based on criteria.

4 ビュー (過去 30 日間)
Eric Escoto
Eric Escoto 2021 年 10 月 12 日
コメント済み: Eric Escoto 2021 年 10 月 12 日
I'm trying to remove rows of a timetable based on if any cell is greater than or equal to 8.
My line is below, can't see what the issue is with my indexing.
TT(TT{:,2:2001} >= 8, :) = [] % Remove rows with values greater than or equal to 8.0.
I only want to include columns 2:2001, but apply the indexing to all times (rows) in my data.
Thanks.

採用された回答

Walter Roberson
Walter Roberson 2021 年 10 月 12 日
TT(any(TT{:,2:2001} >= 8,2), :) = [];

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by