Skip to Main Content Skip to Search
Product Documentation

getsampleusingtime - Class: timeseries

Extract data samples into new timeseries object

Syntax

ts1 = getsampleusingtime(ts, time)
ts1 = getsampleusingtime(ts, starttime, endtime)

Description

ts1 = getsampleusingtime(ts, time) returns a new timeseries object, ts1, with a single sample corresponding to specified time in ts.

ts1 = getsampleusingtime(ts, starttime, endtime) returns a new timeseries object, ts1, with samples between the times starttime and endtime in ts.

Tips

Input Arguments

ts

The timeseries object from which you want to extract data samples.

time

The time corresponding to data sample you want to extract.

starttime

The time corresponding to the first data sample you want to extract.

endtime

The time corresponding to the last data sample you want to extract.

Output Arguments

ts1

A timeseries object that contains the subset of data samples from the original timeseries object.

See Also

timeseries

  


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