NaT 56 0 0
09-Jun-2016 09:53:57 67 0.03 3.4
09-Jun-2016 08:49:10 62 0.01 2.7
09-Jun-2016 08:49:10 75.8 0.01 2.7
09-Jun-2016 08:49:10 82 0.01 2.7
09-Jun-2016 05:03:11 66.2 0.05 3
09-Jun-2016 08:49:10 67.2 0.01 2.7
09-Jun-2016 04:12:00 58.8 NaN NaN
Remove Rows with Missing Times
Remove rows that have NaT, or a missing value, as the row time. To find missing values in
the vector of row times, use the ismissing function. ismissing returns a logical vector
that contains 1 wherever TT.Time has a missing value. Index back into the timetable to
keep only those rows that do not have missing values as row times. Assign those rows to
TT2.
TF = ismissing(TT.Time);
TT2 = TT(~TF,:);
TT2
TT2=11×4 timetable
Time Temp Rain WindSpeed
09-Jun-2016 06:01:04 73 0.01 2.3
09-Jun-2016 07:59:23 59 0.08 0.9
09-Jun-2016 09:53:57 59 0.03 3.4
09-Jun-2016 09:53:57 67 0.03 3.4
09-Jun-2016 09:53:57 67 0.03 3.4
09-Jun-2016 08:49:10 62 0.01 2.7
09-Jun-2016 08:49:10 75.8 0.01 2.7
09-Jun-2016 08:49:10 82 0.01 2.7
09-Jun-2016 05:03:11 66.2 0.05 3
09-Jun-2016 08:49:10 67.2 0.01 2.7
09-Jun-2016 04:12:00 58.8 NaN NaN
This method removes only the rows that have missing row times. The table variables
might still have missing data values. For example, the last row of TT2 has NaN values for
the Rain and Windspeed variables.
Clean Timetable with Missing, Duplicate, or Nonuniform Times