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

frechet_pdf(x, gamma, beta, mu);
% frechet_pdf.m - evaluates an Extreme Value 2 (Frechet) Probability Density.
%   See "Dataplot Reference Manual, EV2CDF", 8-29, NIST, 3/20/1997.
%
%  Created by Jim Huntley,  11/18/03
%
%

function [y] = frechet_pdf(x, gamma, beta, mu);

if(x <= mu)
    y = gamma * ((-x+mu)/beta)^(-gamma-1) * exp(-((-x+mu)/beta)^(-gamma));
else
    y = gamma * ((x-mu)/beta)^(-gamma-1) * exp(-((x-mu)/beta)^(-gamma));
end

return

Contact us