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

trunexp_pdf(x, b, lambda)
% trunexp_pdf.m - evaluates the Truncated Exponential Probability Density.  
% See "http://www.math.siu.edu/olive/
% ch4.pdf#search=%22%22chapter%204%22%20%2B%22truncated%20Distributions%22%22" 
%
% Created by:   Jim Huntley,  08/22/02.
%

function [pdf] = trunexp_pdf(x, b, lambda)

coef = 1 / (lambda*(1-exp(-b/lambda)));
pdf = coef * exp(-x/lambda);

return

Contact us