How to do Peak over Threshold using findpeaks?

8 次查看(过去 30 天)
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

回答(2 个)

Image Analyst
Image Analyst 2020-6-12
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 2021-8-27
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 个评论
Image Analyst
Image Analyst 2021-8-27
Feel free to thank me also by clicking the "Accept this answer" link. Thanks in advance.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by