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_cdf(x, alpha, bet, theta)
% asymlapl_cdf.m - evaluates an Asymmetric Laplace Cumulative Distribution.
%   See "Log-Laplace Distribuitions", T. J. Kozubowski and K. Podgorski, 
%   U. NV Reno and IU.
%
%  Created by Jim Huntley,  07/18/06
%

function [cdf] = asymlapl_cdf(x, alpha, bet, theta)

%persistent coef

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

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

return

Contact us