How to do Peak over Threshold using findpeaks?

조회 수: 26 (최근 30일)
Michiel Smit
Michiel Smit 2020년 6월 12일
댓글: Image Analyst 2021년 8월 27일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by