plot contours of joint return period
3 views (last 30 days)
Show older comments
Hi everybody,
I am trying to plot contours for variable "T" and something like this figure should be obtained:

T itself is a function of WL and Hs. Below is my code:
clc
clear all
WL = gevrnd(-0.4176,0.6703,1.4837,100000,1);
Hs = gprnd(-0.0960,0.2152,1.7001,100000,1);
U = cdf('generalized extreme value',WL,-0.4176,0.6703,1.4837);
V = cdf('Generalized Pareto',Hs,-0.0960,0.2152,1.7001);
mu = 0.08;
for i=1:length(WL)
for j=1:length(Hs)
Cc(i,j) = exp(1-((((1-log(U(i))).^0.9838-1).^1.0075+((1-log(V(j))).^0.9838-1)...
.^1.0075).^0.9926+1).^1.0165);
test(i,j)=1-U(i)-V(j)+Cc(i,j);
T(i,j)=mu/test(i,j);%year
end
end
v=[1 25];
[C,h]=contour(WL,Hs,T,v);
clabel(C,h);
Anyone had experience about such analyses?
1 Comment
Smit Doshi
on 11 Aug 2022
Hello, were you able to find the solution. If yes it would be nice of you if you could share the script I am also looking to plot something similar to this.
Answers (0)
See Also
Categories
Find more on Contour Plots 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!