Removing Leap day from my timetable

3 visualizaciones (últimos 30 días)
Hamed Hedayatnia
Hamed Hedayatnia el 28 de Abr. de 2020
Comentada: Adam Danz el 28 de Abr. de 2020
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 comentario
Adam Danz
Adam Danz el 28 de Abr. de 2020
That data you attached does not contain a timetable or any kind of datatime data.

Iniciar sesión para comentar.

Respuesta aceptada

Adam Danz
Adam Danz el 28 de Abr. de 2020
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 comentarios
Hamed Hedayatnia
Hamed Hedayatnia el 28 de Abr. de 2020
Thanks Adam, I applied it in anouther file and it works great.
Adam Danz
Adam Danz el 28 de Abr. de 2020
Sounds like you worked it out! Glad I could help.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Type Identification en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by