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

genweib_pdf(x, a, omega, nn, bet)
% genweib_pdf.m - evaluates a Generalized Weibull 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] = genweib_pdf(x, a, omega, nn, bet)

%persistent coef

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

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

return

Contact us