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

lospowrat_pdf(x, nn, m, a)
% lospowrat_pdf.m - evaluates an Largest Order Statistic Power Ratio Probability Density.
%   See "Handbook of Beta Distribution and Its Applications", A.K Gupta &,
%   S. Nadarajah, 2004. 
%
%  Created by Jim Huntley,  09/12/11
%

function [pdf] = lospowrat_pdf(x, nn, m, a)

sx = size(x,2);
for jx = 1:sx
    if(x(jx) <= 1)
        pdf(jx) = nn .* m .* a .* x(jx).^(nn*a-1) ./ (m+nn);
    else
        pdf(jx) = nn .* m .* a .* x(jx).^(-m*a-1) ./ (m+nn);
    end
end

return

Contact us