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

trungaus_cdf(x, a, b, mu, sigma)
% trungaus_cdf.m - evaluates the Truncated Gaussian Cumulative Distribution.  
% See "Dataplot Reference Manual", TNRCDF, p. Aux-352, NIST, 26 March, 1977.
%
% Created by:   Jim Huntley,  08/22/02.
%

function [cdf] = trungaus_cdf(x, a, b, mu, sigma)

cdf = (gaus_cdf(x, mu, sigma) - gaus_cdf(a, mu, sigma)) / ...
      (gaus_cdf(b, mu, sigma) - gaus_cdf(a, mu, sigma));

return

Contact us