Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

skewpe_cdf(x, mu, sigma, nu, lambda)
% skewpe_cdf.m - compute Skew Power Exponential Cumulative Distribution Function.
%   See "Skew Scale Mixture of Normal Distributions: Properties and Estimation",
%   C. da Silva Ferreira, H. Bolfarine (Sao Paolo), V. H. Lachos. 
%   Vector form of CDF!!!
%  Created by Jim Huntley,  11/20/07

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

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(@skewpe_pdf,minx,x(jz),tol,trace,mu,sigma,nu,lambda);


Contact us