Environmental Engineering Reference
In-Depth Information
display(Kendall_X);
%
% Scatter plots of U
figure;
scatter(U(:,1),U(:,2),'.','b');
if(Kendall_data(1,2) > 0)
legend('Simulated data for U','Location','SouthEast');
else
legend('Simulated data for U','Location','SouthWest');
end
axis([-0.05 1.05 -0.05 1.05]);
box on
xlabel('{\it U}_1','fontname','Times New Roman');
ylabel('{\it U}_2','fontname','Times New Roman');
%
% Scatter plots of X
figure;
scatter(X(:,1),X(:,2),'.','b');
if(Kendall_data(1,2) > 0)
legend('Simulated data for X','Location','SouthEast');
else
legend('Simulated data for X','Location','NorthEast');
end
xmin = min(data(:,1))-0.1*(max(data(:,1))-min(data(:,1)));
xmax = max(data(:,1)) + 0.4*(max(data(:,1))-min(data(:,1)));
ymin = min(data(:,2))-0.1*(max(data(:,2))-min(data(:,2)));
ymax = max(data(:,2)) + 0.4*(max(data(:,2))-min(data(:,2)));
axis([xmin xmax ymin ymax]);
box on
xlabel('{\it c}','fontname','Times New Roman');
ylabel('{\it fai}','fontname','Times New Roman');
(3) definition of subfunctions used in the above programs
% Definition of No.16 copula's dependence parameter estimation function,
% theta_estimation16_Kendall
function y = theta_estimation16_Kendall(tau)
a = 1e-6;
b = 1e4;
eps = 1e-6;
fx = @(theta,tau)1 + 4*quadgk(@(t)(theta./t + 1).*(1-t)./(theta./t.^2.*(t-1)-
(theta./t + 1)),0,1)-tau;
fa = fx(a,tau);
fb = fx(b,tau);
if fa*fb > 0
disp('error:[a b] interval no solution, please re-enter a and b');
return
end
while b-a > eps
c = 0.5*(a + b);
fc = fx(c,tau);
if(fc*fa < 0)
b = c;
fb = fc;
Search WWH ::




Custom Search