- •Interpolation: a tsdata.Interpolation object defining
- •Increment: interval between two subsequent time values
- •IsTimeFirst: True (default) when the first dimension of the data array is
- •Indicates additional field-value pairs using the following fields:
- •Vector.
- •Interpolation methods are 'linear' and 'zoh'.
- •Values.
- •Values assigned to a time series object
- •Is false. Index is specified as an integer array.
- •Is a valid datestr format, the output strings from getAbsTime have the same format.
- •Time Series events
- •View the properties (EventData, Name, Time, Units, StartDate) of the
- •Overloaded arithmetic operations
- •Overloaded statistical functions
- •Time Series collection general
- •Time Series collection manipulations
- •In string name, from the tscollection tsc.
- •Values.
- •Vertcat Overloaded vertical concatenation for tscollection object
- •Is a valid datestr format, the output strings from getAbsTime have the same format.
Indicates additional field-value pairs using the following fields:
'Quality': an array of Quality codes (for more information, type help tsprops)
'OverwriteFlag': a logical value that control how to handle
duplicated times. When true, the new samples will
overwrite old samples defined at the same times.
For example:
ts=addsample(ts,'Data',3.2,'Quality',1,'OverwriteFlag',true,'Time',3);
See also timeseries/timeseries, timeseries/delsample
Reference page in Help browser
doc timeseries/addsample
<timeseries/delsample> - Delete sample(s) from a time series object.
DELSAMPLE Delete one or more samples from a timeseries object
TS = DELSAMPLE(TS,'Index',VALUE) removes samples from the timeseries
object TS. Here, VALUE specifies the indices of the TS time vector that
correspond to the samples you want to remove.
TS = DELSAMPLE(TS,'Value',VALUE) removes samples from the time series
object TS. Here, VALUE speifies the time values that correspond to the
samples you want to remove.
See also timeseries/timeseries, timeseries/addsample
Reference page in Help browser
doc timeseries/delsample
<timeseries/synchronize> - Synchronize two time series objects onto a common time vector.
SYNCHRONIZE Synchronize two time series objects onto a common time
Vector.
[TS1 TS2] = SYNCHRONIZE(TS1, TS2, 'SYNCHRONIZEMETHOD') creates a new time series object by synchronizing the time series objects TS1 and TS2 onto a common time vector. SYNCHRONIZE replaces both of the original time
series objects TS1 and TS2 with the new synchronized time series
objects. The string 'SYNCHRONIZEMETHOD' defines the method for synchronizing the time series and can be one of the following:
'Union' - Resamples time series on a time vector that is a union of the
time vectors of TS1 and TS2 on the time interval where the two
time vectors overlap.
'Intersection' - Resamples time series on a time vector that is the
intersection of the time vectors of TS1 and TS2.
'Uniform' - this method requires an additional argument as follows:
[TS1 TS2] = SYNCHRONIZE(TS1, TS2, 'UNIFORM', 'interval',VALUE) resamples time
series on a uniform time vector, where VALUE specifies the time
interval. The range of the uniform time vector is equal to the overlap
of the time vectors of TS1 and TS2. The interval units are assumed to
be the larger units of TS1 and TS2.
You can specify additional arguments by using Property-Value pairs:
'interpmethod',VALUE: forces the specified interpolation method
(over the default method) for this SYNCHORNIZE operation. VALUE can
be either a string, 'linear' or 'zoh', or a tsdata.interpolation
object that contains a user-defined interpolation method.
'qualitycode',VALUE: an integer (between -128 to 127) you specify
by VALUE is used as the quality for both time series after the
synchronization.
'keepOriginalTimes',VALUE: a logical value (TRUE or FALSE) you specify
by VALUE is used to indicate whether the new time series should
keep the original time values. For example,
ts1 = timeseries([1 2],[datestr(now); datestr(now+1)]);
ts2 = timeseries([1 2],[datestr(now-1); datestr(now)]);
Note that ts1.timeinfo.StartDate is one day after ts2.timeinfo.StartDate.
if you use
[ts1 ts2] = synchronize(ts1,ts2,'union');
then the ts1.timeinfo.StartDate is changed to be the same as
ts2.timeinfo.StartDate. But, if you use
[ts1 ts2] = synchronize(ts1,ts2,'union','KeepOriginalTimes',true);
then the ts1.timeinfo.StartDate is not changed.
'tolerance',VALUE: a real number you specify by VALUE is used
as the tolerance for differentiating two time values when comparing
the TS1 and TS2 time vectors. The default tolerance is 1e-10. For
example, if the sixth time value in TS1 is 5+(1e-12) and the sixth
time value in TS2 is 5-(1e-13), by default, they will both be
treated as 5. To differentiate those two times, you can set
'tolerance' to a smaller value, for example 1e-15.
See also timeseries/timeseries, tsdata.interpolation/interpolation
Reference page in Help browser
doc timeseries/synchronize
<timeseries/resample> - Resample time series data.
RESAMPLE Redefine a time series based on a new time vector.
TS = RESAMPLE(TS,TIMEVEC) resamples the time series object TS on the
new time vector TIMEVEC. When TIMEVEC is numeric, it is assumed to be
specified relative to the TS.TimeInfo.StartDate property and in the same
units as the time series TS uses. When TIMEVEC is an array of date
strings, then it is used directly.
TS = RESAMPLE(TS,TIMEVEC,INTERP_METHOD) resamples time series TS using the interpolation method given by the string INTERP_METHOD. Valid
