Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates



generates random variates from over 870 univariate distributions

dbtrnorm_pdf(x, mu, sigma, A, B)
% test_dbtrnorm.m - tests a Doubly Truncated Normal Probability Density.
%   See "Continuous Univariate Distributions", Johnson, Kotz and Balakrishnan,
%   Vol.1, J. Wiley, 1995, p.156.
%  Created by Jim Huntley,  10/13/08

function [pdf] = dbtrnorm_pdf(x, mu, sigma, A, B)

%persistent denom

    denom = gaus_cdf(B,mu,sigma) - gaus_cdf(A,mu,sigma);

pdf = gaus_pdf(x,mu,sigma) ./ denom;


Contact us