Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

mixbint_cdf(x,nn,p,nu)
% mixbint_cdf.m - compute Mixed Binomial T Cumulative Distribution Function.
%   See "Continuous Univariate Distributions", v.2, Johnson, Kotz, & Balakrishnan,
%   J. Wiley, 1995, p.421.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  7/11/07
%

function [cdf] = mixbint_cdf(x,nn,p,nu)

% Integrate PDF to get CDF.
pdf = mixbint_pdf(x, nn,p,nu);
sz = size(x,2);
for jz = 1:sz
    cdf(jz) = simps(x(1:jz),pdf(1:jz));
end

return



Contact us