extract data in specific interval

조회 수: 5 (최근 30일)
Rachele Franceschini
Rachele Franceschini 2021년 9월 21일
답변: KSSV 2021년 9월 21일
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일
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개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by