how to find out the time interval between two consecutive events?
Show older comments
sir, i need to find out the time interval between two consecutive events. i have around 4000 data with increasing numbers but not consecutive. i have to find out the events of 4 consecutive numbers or more and the gap between two consecutive events. how is it possible?
1 Comment
So far, the best solution is more or less the same as mine below
Accepted Answer
More Answers (1)
dpb
on 13 Dec 2014
1 vote
Check out
Those are two I recall from File Exchange, there may be others as well suited to your particular problem...
3 Comments
trailokya
on 13 Dec 2014
dpb
on 13 Dec 2014
Did you not look at the linked-to File Exchange routines? I believe either of them will do the job for you...
Without extensive testing, I believe
>> d=find(diff([0 A])>1);
>> d(diff(d)>3)
ans =
3 11
>>
are the locations in question, but I suspect the two submittals are more robust.
trailokya
on 13 Dec 2014
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!