Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

 

generates random variates from over 870 univariate distributions

pearson7_cdf(x,m,MM)
% pearson7_cdf.m - compute Pearson VII Cumulative Distribution Function.
% See "A Skewed Truncated Pearson Type VII Distribution", S. Nadarajah and A. K. Gupta,
% J. Japan Statistical Soc., Vol. 35, No. 1, 2005.
%
%  Created by:  Jim Huntley,  08/25/06.
%

function [cdf] = pearson7_cdf(x,m,MM)

for jx = 1:size(x,2)
    if(x(jx) <= 0)
        cdf(jx) = 0.5.*betainc(m./(m+x(jx).^2),MM-1,0.5);
    elseif(x(jx) > 0)
        cdf(jx) = 1 - 0.5.*betainc(m./(m+x(jx).^2),MM-1,0.5);
    end
end

return



Contact us