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

powexp_cdf(x,mu,sigma,nu)
% powexp_cdf.m - compute Power ExponentialCumulative Distribution Function.
%   See "The gamlss Package", 29 May 2006, see
%   "http://cran.xedio.de/doc/packages/gamlss.pdf".            
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  08/23/06.
%

function [cdf] = powexp_cdf(x,mu,sigma,nu)

pxpdf = powexp_pdf(x,mu,sigma,nu);
sx = size(x,2);
qz(1:sx) = 0;

for jx = 1:sx
    if(jx <= 2)
        cdf(1) = pxpdf(1);
    elseif(jx > 2)
        dx = x(2)-x(1);
        cdf(jx) = simps(pxpdf(1:jx)) * dx;
    end
end

return



Contact us