帮助中心帮助中心
从 timeseries 中删除事件
timeseries
tsout = delevent(tsin,eventname)
tsout = delevent(tsin,eventname,n)
示例
tsout = delevent(tsin,eventname) 从 timeseries 对象 tsin 的 tsin.Events 属性中删除 tsdata.event 对象。eventname 参量可以是包含单个事件名称的字符向量,也可以是包含事件名称集合的元胞数组。
tsin
eventname
tsin.Events
tsdata.event
tsout = delevent(tsin,eventname,n) 从名为 eventname 的事件的 tsin.Events 属性中删除第 n 个 tsdata.event 对象。
n
全部折叠
创建 timeseries 和事件,然后将事件添加到 timeseries 中。
tsin = timeseries((1:5)'); tsevent = tsdata.event('MyEvent',1); tsin = addevent(tsin,tsevent); tsin.Events
EventData: [] Name: 'MyEvent' Time: 1 Units: 'seconds' StartDate: ''
删除名为 MyEvent 的事件。
MyEvent
tsout = delevent(tsin,'MyEvent'); tsout.Events
ans = 1x0 empty handle
输入 timeseries,指定为标量。
数据类型: timeseries
事件名称,指定为包含 tsdata.event 对象名称的字符向量或包含多个事件名称的元胞数组。
数据类型: char | cell
char
cell
事件编号,指定为整数标量,对应于 timeseries 对象的第 n 个 tsdata.event。
数据类型: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
double
single
int8
int16
int32
int64
uint8
uint16
uint32
uint64
在 R2006a 之前推出
addevent | timeseries | tsdata.event
addevent
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office