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

confluhyp_cdf(x,p,q,s)
% confluhyp_cdf.m - compute Confluent Hypergeometric Cumulative Distribution Function.
%                  See "A Generalization of Generalized Beta Distributions", M. B. Gordy, Fed. Res., 4/8/98.
%
%                  Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  03/10/05.
%

function [cdf] = confluhyp_cdf(x,p,q,s)

% Integrate PDF to get CDF.
pdf = confluhyp_pdf(x,p,q,s);
for jx = 1:size(x,2)
    if(jx == 1)
        cdf(1) = pdf(1);
    elseif(jx == 2)
        cdf(jx) = trapz(x(1:jx),pdf(1:jx));
    elseif(jx > 2)
        cdf(jx) = simps(x(1:jx),pdf(1:jx));
    end
end


return



Contact us