Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates



generates random variates from over 870 univariate distributions

% p7birnsan_cdf.m - compute Pearson 7 Birnbaum Sanders Cumulative Distribution Function.
%   See "A New Family of Life Distributions Based on Birnbaum-Sanders
%   Distribution", J.A. Diaz-Garcia and V. Leiva-Sanchez,
%   Vector Form of CDF!!!
%   Created by Jim Huntley,  12/09/09

function [cdf] = p7birnsan_cdf(x,alpha,bet,q,r)

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(@p7birnsan_pdf,minx,x(jz),tol,trace,alpha,bet,q,r);


Contact us