Environmental Engineering Reference
In-Depth Information
zz = z*inv(chol(cov(z)));
switch Type_Copula
case 'Gaussian'
Q = chol(rho);
Y = zz*Q;
U = normcdf(Y);
case 'Plackett'
V = normcdf(zz);
U = zeros(size(V));
U(:,1) = V(:,1);
a = V(:,2).*(1-V(:,2));
b = theta + a.*(theta-1)^2;
c = 2*a.*(U(:,1).*theta^2 + 1-U(:,1)) + theta.*(1-2.*a);
d = sqrt(theta).*sqrt(theta + 4.*a.*U(:,1).*(1-U(:,1)).*(1-theta)^2);
U(:,2) = (c-(1-2.*V(:,2)).*d)./(2.*b);
case 'Frank'
V = normcdf(zz);
U = zeros(size(V));
U(:,1) = V(:,1);
U(:,2) = -1/theta.*log(1 + V(:,2).*(1-exp(-theta))./(V(:,2).*(exp(-
theta.*U(:,1))-1)-exp(-theta.*U(:,1))));
case 'No.16'
V = normcdf(zz);
U = zeros(size(V));
U(:,1) = V(:,1);
for m = 1:N
U(m,2) = U2_solve16(U(m,1),V(m,2),theta);
end
end
%
% Mean of U, mu_U
mu_U = mean(U);
display(mu_U);
%
% Pearson's linear correlation coefficient of U, Pearson_U
Pearson_U = corr(U);
display(Pearson_U);
%
% Kendall's tau of U, Kendall_U
Kendall_U = corr(U,'type','Kendall');
display(Kendall_U);
%
% Simulation of physical variables from constructed joint probability
% distribution, X
X = zeros(size(U));
for m = 1:2
X(:,m) = X_value(U(:,m),mu(m),sigma(m),distri{1,m});
end
%
% Pearson's linear correlation coefficient of X, Pearson_X
Pearson_X = corr(X);
display(Pearson_X);
%
% Kendall's tau of X, Kendall_X
Kendall_X = corr(X,'type','Kendall');
Search WWH ::




Custom Search