Skip to Main Content Skip to Search
Product Documentation

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

Syntax

tsc2=getsampleusingtime(tsc1,Time)
tsc2=getsampleusingtime(tsc1,StartTime,EndTime)

Description

tsc2 = getsampleusingtime(tsc1,Time) returns a new tscollection tsc2 with a single sample corresponding to Time in tsc1.

tsc2 = getsampleusingtime(tsc1,StartTime,EndTime) returns a new tscollection tsc2 with samples between the times StartTime and EndTime in tsc1.

Tips

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

tscollection

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS