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

lognormb_pdf(x, B, sigsq, mu)
% lognormb_pdf.m - evaluates a Lognormal B Probability Density.
%   See "A Compendium of Distributions", ModelRisk 3.0, Vose Software,
%   http://www.vosesoftware.com/content/ebook.pdf.
%
%  Created by Jim Huntley,  08/11/11
%

function [pdf] = lognormb_pdf(x, B, sigsq, mu)

lnB = log(B);
V = sigsq * lnB;
m = mu * lnB;
coef = 1 / sqrt(2*pi*V);
pdf = coef .* exp(-0.5.*(log(x)-m).^2 ./ V) ./ x;

return

Contact us