Quantcast

Documentation Center

  • Trial Software
  • Product Updates

delsample

Class: timeseries

Remove sample from timeseries object

Syntax

ts1 = delsample(ts,Name,Value)

Description

ts1 = delsample(ts,Name,Value) deletes samples from the timeseries object ts based on the specified Name,Value pair arguments.

Input Arguments

ts

A timeseries object.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'Index'

The indices of the time vector that correspond to the samples you want to delete.

'Value'

The time values that correspond to the samples you want to delete.

Output Arguments

ts1

The timeseries object that results from removing the specified samples.

Examples

Create a timeseries object, and then remove samples:

ts = timeseries(rand(5,1),[10 20 30 40 50]);

% Remove data sample at time index 1

ts1 = delsample(ts,'Index', 1)

% Remove data sample at time value 20:

ts2 = delsample(ts,'Value', [20])

See Also

|

Was this topic helpful?