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

johnsu_pdf(x, alpha1, alpha2)
% johnsu_pdf.m - evaluates a Johnson SU Probability Density.
%   See "Dataplot Reference Manual, JSUPDF", AUX - Vol. 2, NIST.
%
%  Created by Jim Huntley,  11/21/03
%

function [pdf] = johnsu_pdf(x, alpha1, alpha2)

arg = alpha1 + alpha2*log(x+sqrt(x^2+1));
phi = exp(-0.5*arg^2) / sqrt(2*pi);			
pdf = alpha2 * phi / sqrt(x^2+1);

return

Contact us