MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
ans =
TimetableProperties with properties:

Description: ''
UserData: []
DimensionNames: {'Date' 'Variables'}
VariableNames: {'Tmax' 'Tmin' 'PrecipTotal' 'WXEvent'}
VariableDescriptions: {}
VariableUnits: {}
VariableContinuity: [continuous continuous step event]
RowTimes: [5x1 datetime]
StartTime: 04-May-2017
SampleRate: NaN
TimeStep: NaN
CustomProperties: No custom properties are set.
Use addprop and rmprop to modify CustomProperties.

Resample the data in Station1. Given the values assigned to VariableContinuity,
the retime function interpolates the temperature data, fills in the previous day's values
in PrecipTotal, and fills in WXEvent with undefined elements.

Station1Daily = retime(Station1,'daily')

Station1Daily=7×5 timetable
Date Tmax Tmin PrecipTotal WXEvent
___________ ____ ______ ___________ ___________

04-May-2017 60 44 0.2 Hail
05-May-2017 62 45 0 None
06-May-2017 60 43.333 0 <undefined>
07-May-2017 58 41.667 0 <undefined>
08-May-2017 56 40 0 None
09-May-2017 59 42 0.15 Thunder
10-May-2017 60 45 0 None

If you specify a method, then retime applies that method to all variables, overriding the
values in VariableContinuity.

Station1Missing = retime(Station1,'daily','fillwithmissing')

Station1Missing=7×5 timetable
Date Tmax Tmin PrecipTotal WXEvent
___________ ____ ____ ___________ ___________

10 Timetables

Free download pdf