I have one table with two columns: date (01-01-2010 to 31-08-2021), value
I would like to get only data during 2020. There is a function or similar to get some only data in specific period?

 採用された回答

KSSV
KSSV 2021 年 9 月 21 日

0 投票

Let thedates be your datetime array.
[y,m,d,h,m,s] = datevec(thedates) ;
iwant = thedates(y==2020)
You can also use inequalities like ==, >, <, >=, <= on these dates.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

製品

リリース

R2021a

質問済み:

2021 年 9 月 21 日

回答済み:

2021 年 9 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by