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

genxval_pdf(x, gam, mu, sigma)
% genxval_pdf.m - evaluates a Generalized Extreme Value Probability Density.
%   See "Dataplot Reference Manual, GEVCDF", AUX-194, NIST, 3/25/97..
%
%  Created by Jim Huntley,  11/13/03
%
%

function [pdf] = genxval_pdf(x, gam, mu, sigma)

if(abs(gam) > eps)
    pdf = (exp(-(1-gam.*((x-mu)./sigma)).^(1/gam)) .* ...
        (1-gam.*((x-mu)./sigma)).^((1/gam)-1)) ./ sigma;
elseif(gam == 0)
    pdf = exp(-(exp(-(x-mu)./sigma))) .* exp(-(x-mu)./sigma) ./ sigma;
end

return

Contact us