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

binunif_cdf(x,p,h)
% binunif_cdf.m - compute Binomial Uniform Cumulative Distribution Function.
%   See "Continuous Univariate Distributions", V 2, Johnson, Kemp, and Kotz,
%   J. Wiley, p.310, 1996.                
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  03/30/05.
%

function [cdf] = binunif_cdf(x,p,h)

tol = 1e-8;
trace = [];
warning off MATLAB:quad:MinStepSize;

minx = min(x);

% Integrate PDF to get CDF.
warning off MATLAB:quad:MinStepSize
sz = size(x,2);
for jz = 1:sz
    cdf(jz) = quad(@binunif_pdf,minx,x(jz),tol,trace,p,h);
end

return



Contact us