cf2Dist2D calculates the CDF and PDF from the BIVARIATE characteristic function CF by using the Gil-Pelaez inversion formulae and the Riemann quadrature sum, as suggested in Shephard (1991).
The algorithm cf2Dist2D is a part of the MATLAB toolbox CharFunTool: https://github.com/witkovsky/CharFunTool
result = cf2Dist2D(cf,x)
EXAMPLE 1 (CDF/PDF of bivariate standard normal distribution)
cf = @(t) exp(-(0.9*t(:,1).^2 + 0.3*t(:,2).^2 +2*0.4*t(:,1).*t(:,2))/2);
result = cf2Dist2D(cf)
% EXAMPLE 2 (CDF/PDF of a mixture of bivariate logistic distributions)
mu1 = [0 2];
beta1 = [1 2];
cf1 = @(t) cf2D_Logistic(t,mu1,beta1);
mu2 = [2 1];
beta2 = [2 1];
cf2 = @(t) cf2D_Logistic(t,mu2,beta2);
cf = @(t) 0.25*cf1(t) + 0.75*cf2(t);
options.xN = 51;
result = cf2Dist2D(cf,,options)
Viktor Witkovsky (2021). Numerical Inversion of a Bivariate Characteristic Function (https://www.mathworks.com/matlabcentral/fileexchange/90297-numerical-inversion-of-a-bivariate-characteristic-function), MATLAB Central File Exchange. Retrieved .
Inspired by: CharFunTool: The Characteristic Functions Toolbox
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!