getsampleusingtime (timeseries) - Extract data samples into new timeseries object

Syntax

ts2 = getsampleusingtime(ts1,Time)
ts2 = getsampleusingtime(ts1,StartTime,EndTime)

Description

ts2 = getsampleusingtime(ts1,Time) returns a new timeseries object ts2 with a single sample corresponding to the time Time in ts1.

ts2 = getsampleusingtime(ts1,StartTime,EndTime) returns a new timeseries object ts2 with samples between the times StartTime and EndTime in ts1.

Remarks

When the time vector in ts1 is numeric, StartTime and EndTime must also be numeric. When the times in ts1 are date strings and the StartTime and EndTime values are numeric, then the StartTime and EndTime values are treated as datenum values.

See Also

timeseries

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS