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_cdf(x, B, sigsq, mu)
% lognormb_cdf.m - evaluates a Lognormal B Cumulative Distribution.
%   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 [cdf] = lognormb_cdf(x, B, sigsq, mu)

lnB = log(B);
cdf = 0.5 + (erf((log(x) - lnB*mu).*(1/(2*lnB*sigsq))^(1/2)).*(2*lnB*sigsq)^(1/2)) ./ ...
      (4*lnB*sigsq*(1/(2*lnB*sigsq))^(1/2));

return

Contact us