The standard wrapped-up Cauchy distribution has the following probability density function: f(x,p)= {1-p^2}/{2*pi(1+p^2-2*p*cos(x)}, Where x is from 0 to 2*pi Follow this link for the mathematical expression: Wrapped Cauchy Distribution PDF What is the CDF and INVCDF of this probability distribution? Any command or code is available in MATLAB to get INVCDF?
John Williams answered .
2025-11-20
function main
p = linspace(0,1,11);
prob = linspace(0,1,100);
x = zeros(numel(p),numel(prob));
for i = 1:numel(p)
for j = 1:numel(prob)
x(i,j) = INVCDF(p(i),prob(j));
end
end
plot(prob,x(1,:),prob,x(2,:),prob,x(3,:),prob,x(4,:),prob,x(5,:),...
prob,x(6,:),prob,x(7,:),prob,x(8,:),prob,x(9,:),prob,x(10,:),...
prob,x(11,:))
end
function x = INVCDF(p,prob)
fun = @(x)CDF(p,x)-prob;
x = fzero(fun,pi);
end
function prob = CDF(p,x)
if x