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

betanorm_cdf(x,alpha,bet,mu,sigma);
% betanorm_cdf.m - compute Beta Normal Cumulative Distribution Function.
%   See "Beta-Normal Distribution: Bimodality Properties and Application", 
%   F. Famoye, C. Lee, N. Eugene,
%   Journal of Modern Applied Staistical Methods, Vol. 3, No. 1, May 2004, p. 85.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  04/05/05

%

function [cdf] = betanorm_cdf(x,alpha,bet,mu,sigma);

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(@betanorm_pdf,minx,x(jz),tol,trace,alpha,bet,mu,sigma);
end

return



Contact us