Frequency plot for extreme value analysis
Afficher commentaires plus anciens
Hi there,
I have obtained my extreme value analysis and I would liike to plot frequency plot like the one below in MATLAB:

I have attached my results as well. If someone could help me with that, I would appreciate it.
Regards,
Ali
Réponses (1)
Vedant Shah
le 9 Avr 2025
To create the frequency plot, we can start by using `readtable` to read the CSV file as follows:
data = readtable('EVA Results.xlsx');
Next, we extract the variables and use `hold on` to plot multiple graphs on the same plot. Initially, we plot a histogram, followed by the frequency graphs using the `plot` functions:
figure;
hold on;
histogram('BinEdges', intervals, 'BinCounts', frequency, 'DisplayStyle', 'stairs', 'LineWidth', 1.5);
plot(intervals(1:end-1), wei2_mom, '-r', 'LineWidth', 1.5);
plot(intervals(1:end-1), wei2_ml, '-g', 'LineWidth', 1.5);
plot(intervals(1:end-1), wei2_lmom, '-b', 'LineWidth', 1.5);
The results obtained using this code are as follows:
For more information, you can refer to the following documentations:
- https://www.mathworks.com/help/releases/R2021a/matlab/ref/readtable.html
- https://www.mathworks.com/help/releases/R2021a/matlab/ref/hold.html
- https://www.mathworks.com/help/releases/R2021a/matlab/ref/matlab.graphics.chart.primitive.histogram.html
- https://www.mathworks.com/help/releases/R2021a/matlab/ref/plot.html
Catégories
En savoir plus sur Data Distribution Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!