Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

genfrech_cdf(x, a, omega, nn, bet)
% genfrech_cdf.m - evaluates a Generalized Frechet Cumulative Distribution.
%   See "The Amoroso Distribution", G. E. Crooks, Tech. Note 003v5 (2010-01-14)
%   http://threeplusone.com/pubs/technote/CrooksTechNote003.pdf.
%
%  Created by Jim Huntley,  10/19/11
%

function [cdf] = genfrech_cdf(x, a, omega, nn, bet)

%persistent coef

%if(isempty(coef))
    coef = bet * nn^2 / (nn^2 * bet);
%end

argx = (x-a) ./ omega;
cdf = coef * exp(-nn*exp(-nn*bet*log(argx)));

return

Contact us