Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

betawarn_cdf(x, b, m, n, nu1, nu2)
% betawarn_cdf.m - compute Beta Warning Time Cumulative Distribution Functions.
%   See "Continuous Univariate Distributions", Johnson, Kotz, and
%   Balakrishnan, V2, J. Wiley, , p.350, 1996.               
%               Vector Form of CDF !!!
%  Created by:  Jim Huntley,  11/17/06.

function [cdf] = betawarn_cdf(x, b, m, n, nu1, nu2)

% Integrate PDF to get CDF.
dx = x(2) - x(1);
pdf = betawarn_pdf(x, b, m, n, nu1, nu2);
for jz = 1:size(x,2);
    cdf(jz) = trapz(pdf(1:jz)) * dx;


Contact us