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

skewlapl_quad_pdf(x, alpha, bet, mu)
% skewlapl_quad_pdf.m - evaluates the Skew LaPlace Probability Density Function.  
%                  See "Dataplot Reference Manual", STPDF.
%                  Vector Form!
%
% Created by Jim Huntley,  03/02/05
%

function [pdf] = skewlapl_quad_pdf(x, alpha, bet, mu)

sx = size(x,2);
for jx = 1:sx
    if(x(jx) < mu)
        pdf(jx) = exp((x(jx)-mu)/alpha) / (alpha+bet);
    elseif(x(jx) >= mu)
        pdf(jx) = exp(-(x(jx)-mu)/bet) / (alpha+bet);
    end
end

return

Contact us