MATLAB 帮助中心
从 timeseries 对象中删除样本
timeseries
tsout = delsample(tsin,'Index',timeind)
tsout = delsample(tsin,'Value',timevals)
tsout = delsample(tsin,'Index',timeind) 删除 tsin 中与 timeind 中的时间索引对应的样本。
tsin
timeind
示例
tsout = delsample(tsin,'Value',timevals) 删除与 timevals 中的时间值对应的样本。
timevals
全部折叠
删除 timeseries 对象中的一个样本。
创建一个 timeseries 并显示其时间采样和对应的数据。
tsin = timeseries((0:10:50)',(0:5)'); tsin.Time
ans = 6×1 0 1 2 3 4 5
tsin.Data
ans = 6×1 0 10 20 30 40 50
通过引用索引(即 6)来删除最后一个样本。
tsout = delsample(tsin,'Index',6); tsout.Time
ans = 5×1 0 1 2 3 4
您也可以指定时间值 5 来删除 tsin 的最后一个样本。
tsout = delsample(tsin,'Value',5);
输入 timeseries,指定为标量。
数据类型: timeseries
时间索引,指定为数值标量或向量。
数据类型: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
double
single
int8
int16
int32
int64
uint8
uint16
uint32
uint64
采样时间,指定为数值标量或向量,或指定为日期字符向量元胞数组。有效日期字符向量可以采用以下格式:
01-Mar-2000 15:45:17
01-Mar-2000
03/01/00
03/01
15:45:17
3:45:17 PM
15:45
3:45 PM
Mar.01,2000 15:45:17
Mar.01,2000
03/01/2000
数据类型: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | cell
cell
在 R2006a 之前推出
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处