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

asymlapl_pdf(x, alpha, bet, theta)
% asymlapl_pdf.m - evaluates an Asymmetric Laplace Probability Density.
%   See "Log-Laplace Distribuitions", T. J. Kozubowski and K. Podgorski, 
%   U. NV Reno and IU.
%
%  Created by Jim Huntley,  07/18/06
%

function [pdf] = asymlapl_pdf(x, alpha, bet, theta)

%persistent coef

%if(isempty(coef))
    coef = alpha*bet/(alpha+bet);
%end

if(x >= theta)
    pdf = coef * exp(-alpha*(x-theta));
elseif(x < theta)
    pdf = coef * exp(bet*(x-theta));
end

return

Contact us