Finding Point of Increased Event Frequency
3 views (last 30 days)
Show older comments
Christopher Eirich
on 13 Sep 2014
Answered: Image Analyst
on 13 Sep 2014
Good morning
I am trying to find the point in my data where an event begins happening more frequently.
For example, here is an image of a plot:

I am interested specifically in finding the point around 3700 where the frequency of the particular event begins occurring more often. The change is subtle, but the slope does begin increasing there.
0 Comments
Accepted Answer
Youssef Khmou
on 13 Sep 2014
Edited: Youssef Khmou
on 13 Sep 2014
From the graph 3700 is approximately the point, from theoretical view point, you can search the inflection point using second derivative, the index of the maximum indicates that transition,
note : d=diff(f,2) truncates one element so if max(d) is N then N+1 is the inflection .
Example :
f=[0:10 (10:20).^2]; plot(f)
figure; plot(diff(f,2))
hold on
plot(f,'r')
title(' Transition point');
0 Comments
More Answers (1)
Image Analyst
on 13 Sep 2014
You can use the triangle thresholding method . How it works is this: Draw a line from the peak to the base of your bar chart. Then draw perpendicular lines from that line until it intersects the bars. The bar (x-value) that has the longest perpendicular line is the one to use. It's good for picking out what looks like the "corner" in humps that have flat parts and steep parts. There is code for it in the File Exchange or the web. It often picks good thresholds when the more common Otsu method fails.
0 Comments
See Also
Categories
Find more on Title 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!