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

logbeta_pdf(x, alpha, bet, c, d)
% logbeta_pdf.m - evaluates a Log Beta Probability Density.
%   See "Dataplot Reference Manual", LBEPDF, Vol.1, Aux. Chapter, NIST.
%   Note Error in text:  PDF needs a factor of dz/dx.
%  Created by Jim Huntley,  12/22/08

function [pdf] = logbeta_pdf(x, alpha, bet, c, d)

z = (log(x)-log(c)) ./ (log(d)-log(c));
pdf = z.^(alpha-1) .* (1-z).^(bet-1) ./ beta(alpha,bet) ./ x ./ (log(d)-log(c));


Contact us