Subset timetable based on variable value using cell format

1 回表示 (過去 30 日間)
Louise Wilson
Louise Wilson 2020 年 7 月 31 日
編集済み: Cris LaPierre 2020 年 7 月 31 日
I have a timetable which looks like this:
I would like to subset the timetable based on the values of the variables DayName,ToD and Season.
I tried this:
summer_obs=Noises_counts(Noises_counts.Season=='Summer',:); %subset summer obs
but I get an error that this method can't be used when the contents of the timetable are 'cell'.
Any pointers?
Thanks!

採用された回答

Cris LaPierre
Cris LaPierre 2020 年 7 月 31 日
編集済み: Cris LaPierre 2020 年 7 月 31 日
Not sure how you imported your data, but I'd import DayNames, ToD, and Season as categoricals. With the data already imported, you can convert them using the categorical function.
Noises_counts.Season = categorical(Noises_counts.Season);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTime Series Events についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by