How to extract the time differences between two events into a table?
显示 更早的评论
'message' contains the event name, 'time' is the timestamp for each event, and 'reltime' is the relative time of each event to the trial start.
I want to find the time lag between each ‘1002‘ and each 'ENDSACC' .
Here is an example:

For the first '1002', its time lag : 'ENDSACC'(3) (72-942= -870) 'ENDSACC'(7) (581-942= -361) 'ENDSACC'(14) (1032-942= 90).
Only the number is important so the ideal result would be like;
1002 -870 -361 90
How can I achieve such results, thank you very much.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 String Parsing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!