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

alpha_cdf(x, alpha, bet)
% alpha_cdf.m - evaluates an Alpha Cumulative Distribution.
%   See "Dataplot Reference Manual, ALPCDF", AUX-9, NIST, 3/24/97.
%
%  Created by Jim Huntley,  11/24/03
%
%

function [cdf] = alpha_cdf(x, alpha, bet)

arg1 = alpha - bet/x;
arg2 = alpha;
phi1 = (erf(arg1/sqrt(2)) + 1) / 2;			% Normal CDF of 'arg1'.
phi2 = (erf(arg2/sqrt(2)) + 1) / 2; 		% Normal CDF of 'arg2'.
cdf = phi1 / phi2;

return

Contact us