www.gusucode.com > stats 源码程序 matlab案例代码 > stats/ComputeGaussianCopulaPdfExample.m

    %% Compute the Clayton Copula pdf
%

% Copyright 2015 The MathWorks, Inc.


%%
% Define two 10-by-10 matrices containing the values at which to compute
% the pdf.
u = linspace(0,1,10);
[u1,u2] = meshgrid(u,u);

%%
% Compute the pdf of a Clayton copula that has an alpha parameter equal to 1,
% at the values in |u|.
y = copulapdf('Clayton',[u1(:),u2(:)],1);

%%
% Plot the pdf as a surface, and label the axes.
surf(u1,u2,reshape(y,10,10))
xlabel('u1')
ylabel('u2')