Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

skewt_pdf(x, nu, lambda)
% skewt_pdf.m - evaluates the Skew T Probability Density Function.  
%               See "Dataplot Reference Manual", STPDF.
%               Vector Form!
% Created by Jim Huntley,  03/02/05

function [pdf] = skewt_pdf(x, nu, lambda)

for jx = 1:size(x,2)
    tpdf = t_pdf(x(jx), nu);
    tlcdf = t_cdf(lambda*x(jx)*sqrt((1+nu)/((x(jx))^2+nu)), nu+1);
    pdf(jx) = 2 * tlcdf * tpdf;


Contact us