Main Content

delsamplefromcollection

tscollection 中删除样本

说明

示例

tscout = delsamplefromcollection(tscin,'Index',ind)tscollection 对象中删除样本。ind 指定与要删除的样本对应的 tscin 时间向量的索引。

tscout = delsamplefromcollection(tscin,'Value',timevals) 删除与 timeval 中的时间值对应的样本。

示例

全部折叠

使用两个 timeseries 对象创建一个 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 = delsamplefromcollection(tscin,'Index',5)
Time Series Collection Object: unnamed

Time vector characteristics

      Start time            1 seconds
      End time              4 seconds

Member Time Series Objects:

      Acceleration
      Speed

输入参数

全部折叠

输入 tscollection,指定为标量。

时间向量索引,指定为标量或向量。

采样时间,指定为数值标量或向量,或指定为日期字符向量元胞数组。有效的日期字符向量和字符串可以采用以下格式:

格式示例
dd-mmm-yyyy HH:MM:SS01-Mar-2000 15:45:17
dd-mmm-yyyy01-Mar-2000
mm/dd/yy03/01/00
mm/dd03/01
HH:MM:SS15:45:17
HH:MM:SS PM3:45:17 PM
HH:MM15:45
HH:MM PM3:45 PM
mmm.dd,yyyy HH:MM:SSMar.01,2000 15:45:17
mmm.dd,yyyyMar.01,2000
mm/dd/yyyy03/01/2000

数据类型: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | cell

版本历史记录

在 R2006a 之前推出