13 December 2020 3 5K Report

Hello:

Can anyone assist with plotting IFORM contours. I have been trying to plot contours using Hs and Tp as variables. The marginal distribution is a GPD-Kernel density and the conditional distribution is lognormal of Tp given Hs. I have extracted the section of the MATLAB script that deals with the plotting of contour, see below. It does not work and the problem seems to be with the conditional distribution, pd(i).

mu_lognormal = mu_fun(x_mu,y); % mu

sigma_lognormal = sigma_fun(x_sigma,y1); % sigma

Tr = 100; % return period contour

Dr = 3; % duration of sea states

Beta = norminv(1-((Dr/(365.25*24*Tr)))); % reliability index

pheta = ((1:360)*2*pi)/360;

xt = Beta*cos(pheta);

yt = Beta*sin(pheta);

indx = normcdf(xt);

jndx = normcdf(yt);

for i = 1:length(xt)

Hs_contour(i) = icdf(H_obj,indx(i));

[val(i), indxx(i)]= min(abs(Hs_contour(i)-xx'));

% evaluate the joint distribution Tp|Hs at the given Hs values

pd(i) = makedist('Lognormal','mu',mu_lognormal(indxx(i)),'sigma',sigma_lognormal(indxx(i)));

Tp_contour(i) = icdf(pd(i),jndx(i));

end



I would be grateful if anyone could either assist with modifying the script or refer me to material or script that would allow me to get some clarification to solve the problem.

Thank you.

Regards,

AOAW

More Andre White's questions See All
Similar questions and discussions