Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

kotz_pdf(x, q, r, s)
% kotz_pdf.m - evaluates a Kotz Probability Density.
%   See "A New Fatique Life Model Based on the Family of Skew-Elliptical Distributions", 
%   F. Vilca-Labra and V. Leiva-Sanchez, Universidade de Campinas, Sao Paolo, Brasil, web.
%   Vector Form of PDF !!!
%  Created by Jim Huntley,  7/07/06

function [pdf] = kotz_pdf(x, q, r, s)

arg = (2*q-1)/(2*s);
%coef = s * r^arg / gamma(arg);
coef = exp(log(s) + arg*log(r) - gammaln(arg));
pdf = coef .* x.^(2*(q-1)) .* exp(-r.*x.^(2*s));    


Contact us