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

distbeta_cdf(x,a2da1,d1,d2,m,p)
% distbeta_cdf.m - compute Distented Beta Cumulative Distribution Function.
%   See "A Beta Warning Time Distribution and a Distended Beta Distribution",
%	H.W. Block & B.R. Rao, Indian J. of Stat., V.35, Series B, Pt.1,1973, p.79.  
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  12/29/08.
%

function [cdf] = distbeta_cdf(x,a2da1,d1,d2,m,p)

% Integrate PDF to get CDF.
dx = x(2) - x(1);
pdf = distbeta_pdf(x,a2da1,d1,d2,m,p);
for jx = 1:size(x,2)
    if(jx <= 2)
        cdf(jx) = trapz(pdf(1:jx)) * dx;
    else
        cdf(jx) = simps(pdf(1:jx)) * dx;
    end
end

return




Contact us