tsOut = addevent(ts, eventObj)
| Parameter | Description |
|---|---|
| ts | Input timeseries object. |
| eventObj | Event created with tsdata.event. |
| Parameter | Description |
|---|---|
| tsOut | Output timeseries object with the event added. |
addevent Adds a named event to the Events list of a timeseries object. Event times use the same time axis as the series.
ts = timeseries([1; 2; 3], [10; 11; 12], 'Name', 'speed');
ev = tsdata.event('middle', 11);
ts = addevent(ts, ev);
ts.Events(1).Name
| Version | Description |
|---|---|
| 2.0.0 | initial version |