Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

toranzo_pdf(x, a, b, c)
% toranzo_pdf.m - compute Toranzo Probability Density Function.
%   See "Non-Uniform Random Deviates", L. Devroye, McGill, p. 482.
%   Note: Distribution is NOT Normalized!!!
%   Vector Form of PDF.
%   Created by:     J. Huntley,  07/19/05

function [pdf] = toranzo_pdf(x, a, b, c)

pdf = x.^c .* exp(-(a+b.*x).^2);

Contact us