How to do Peak over Threshold using findpeaks?

19 views (last 30 days)
Dear all, I am trying to perform a Peak over Threshold analysis for windspeed data to find a fitting general pareto distribution. The first 14 entries data I have is daily data of the wind speed given as follows [year month day windspeed]. The data has been sorted beforehand so that only the windspeed in the direction of interest is used. The first 14 entries look as follows:
2000 1 1 5
2000 1 4 10
2000 1 9 4
2000 1 16 5
2000 1 17 6
2000 1 18 8
2000 1 19 4
2000 1 20 7
2000 1 21 7
2000 1 22 8
2000 1 26 6
2000 1 27 8
2000 1 29 16
2000 1 30 13
My question is how can i perform a peak over threshold analysis on this. Friends have recommended findpeaks(), however I don't know how to use this.
Also, how can i find a fitting threshold to properly fit my General Pareto distribution
Thanks in advance

Answers (2)

Image Analyst
Image Analyst on 12 Jun 2020
Like this?
data = [
2000 1 1 5
2000 1 4 10
2000 1 9 4
2000 1 16 5
2000 1 17 6
2000 1 18 8
2000 1 19 4
2000 1 20 7
2000 1 21 7
2000 1 22 8
2000 1 26 6
2000 1 27 8
2000 1 29 16
2000 1 30 13]
x = data(:, 3);
y = data(:, 4);
plot(x, y, 'b.-', 'LineWidth', 2, 'MarkerSize', 20);
grid on;
[peakValues, peakIndexes] = findpeaks(y)
xPeaks = x(peakIndexes);
hold on;
plot(xPeaks, peakValues, 'r^', 'LineWidth', 2, 'MarkerSize', 20);
xlabel('Column 3', 'FontSize', 20);
ylabel('Column 4', 'FontSize', 20);

Andre White
Andre White on 27 Aug 2021
Image Analyst. Thank you. I am going to try this now. I was wondering how I would do this with both varibales at the same time. This seemed to have solved my problem. Thanks again. Can't tell you how grateful I am for this.
  1 Comment
Image Analyst
Image Analyst on 27 Aug 2021
Feel free to thank me also by clicking the "Accept this answer" link. Thanks in advance.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!