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

normmom_pdf(x, alpha)
% normmom_pdf.m - evaluates a Normal Moment Probability Density.
%   See "On the Normal Moment Distributions", A. Olosunde,
%   http://interstat.statjournals.net/YEAR/2007/articles/0706001.pdf.
%
%   Vector form of PDF!
%
%   Created by Jim Huntley,  12/02/09
%

function [pdf] = normmom_pdf(x, alpha)

%persistent coef

%if(isempty(coef))
    coef = exp(-(alpha+0.5)*log(2) - gammaln(alpha+0.5));
%end

pdf = coef .* (abs(x)).^(2*alpha) .* exp(-0.5.*(x.^2));

return

Contact us