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

malikf_pdf(x, a, b, nu1, nu2)
% malikf_pdf.m - evaluates a Malik F Probability Density.
%   See "Continuous Univariate Distributions", v.1, Johnson, Kotz, & Balakrishnan,
%   J. Wiley, 1995, p.349.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  7/09/07
%

function [pdf] = malikf_pdf(x, a, b, nu1, nu2)

%persistent coef ratio

%if(isempty(coef))
    ratio = nu1 / nu2;
    coef = ratio^(0.5*nu1) / (a*b*beta(0.5*nu1,0.5*nu2)); 
%end

arg = x ./ a;
pdf = coef .* arg.^(0.5.*nu1/b-1) ./ (1+ratio.*arg.^(1/b)).^(0.5.*(nu1+nu2));

return

Contact us