Query tsdata.event times
tsdata.event
eventtimes = getTimeStr(tse,timeunits)
example
eventtimes = getTimeStr(tse,timeunits) returns a cell array containing the times for each tsdata.event in an array tse with units timeunits.
tse
timeunits
collapse all
Create an array of tsdata.event objects and display their times in seconds.
tse1 = tsdata.event('MyEvent',1); tse2 = tsdata.event('MyEvent',2); tse = [tse1 tse2]; eventtimes = getTimeStr(tse,'seconds')
eventtimes = 1x2 cell {'1.000'} {'2.000'}
Input tsdata.event, specified as an array.
'weeks'
'days'
'hours'
'minutes'
'seconds'
'milliseconds'
'microseconds'
'nanoseconds'
Time units, specified as 'weeks', 'days', 'hours', 'minutes', 'seconds', 'milliseconds', 'microseconds', or 'nanoseconds'.
timeseries | tscollection | tsdata.event
timeseries
tscollection
You have a modified version of this example. Do you want to open this example with your edits?