Removing Leap day from my timetable

조회 수: 4 (최근 30일)
Hamed Hedayatnia
Hamed Hedayatnia 2020년 4월 28일
댓글: Adam Danz 2020년 4월 28일
I need to remove leap days of all years from my timetable. I mean all values belong to 29 feb. my timetable is a hourly time table.
  댓글 수: 1
Adam Danz
Adam Danz 2020년 4월 28일
That data you attached does not contain a timetable or any kind of datatime data.

댓글을 달려면 로그인하십시오.

채택된 답변

Adam Danz
Adam Danz 2020년 4월 28일
TT is the timetable and TT.Time is the time column.
isLeapDay is a logical vector identiying the rows of TT that belong to a leap day.
isLeapDay = month(TT.Time)==2 & day(TT.Time)==29;
TT(isLeapDay,:) = []; % remove leap days.
  댓글 수: 8
Hamed Hedayatnia
Hamed Hedayatnia 2020년 4월 28일
Thanks Adam, I applied it in anouther file and it works great.
Adam Danz
Adam Danz 2020년 4월 28일
Sounds like you worked it out! Glad I could help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by