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

genfrech_pdf(x, a, omega, nn, bet)
% genfrech_pdf.m - evaluates a Generalized Frechet Probability Density.
%   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 [pdf] = genfrech_pdf(x, a, omega, nn, bet)

%persistent coef

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

argx = (x-a) ./ omega;
pdf = coef .* argx.^(-nn*bet-1) .* exp(-nn.*argx.^(-nn*bet));

return

Contact us