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

tmix_cdf(x,nn,p,nu)
% tmix_cdf.m - compute binomial Mixture of T Cumulative Distribution Functions.
%   See "Continuous Univariate Distributions", Johnson, Kotz, and
%   Balakrishnan, V2, J. Wiley, , p.355, 1996.               
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  10/30/06.
%

function [cdf] = tmix_cdf(x,nn,p,nu)

% Integrate PDF to get CDF.
dx = x(2) - x(1);
pdf = tmix_pdf(x,nn,p,nu);
sz = size(x,2);
for jz = 1:sz
    cdf(jz) = trapz(pdf(1:jz)) * dx;
end

return



Contact us