Main Content

removets

Remove timeseries from tscollection

Description

example

tscout = removets(tscin,tsname) removes a timeseries object with name tsname from a tscollection object. tsname can be a single character vector or a cell array of character vectors.

Examples

collapse all

Create a tscollection object from two timeseries objects. Then, remove the timeseries named Speed from the tscollection.

ts1 = timeseries([1.1 2.9 3.7 4.0 3.0]',1:5,...
                 'Name','Acceleration');
ts2 = timeseries([3.2 4.2 6.2 8.5 1.1]',1:5,...
                 'Name','Speed');
tscin = tscollection({ts1;ts2});
tscout = removets(tscin,'Speed')
Time Series Collection Object: unnamed

Time vector characteristics

      Start time            1 seconds
      End time              5 seconds

Member Time Series Objects:

      Acceleration

Input Arguments

collapse all

Input tscollection, specified as a scalar.

timeseries name, specified as a character vector or a cell array of character vectors.

Introduced before R2006a