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_cdf(x, b, lambda)
% trunexp_cdf.m - evaluates the Truncated Exponential Cumulative Distribution.  
% 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 [cdf] = trunexp_cdf(x, b, lambda)

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

return

Contact us