Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

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

function [cdf] = lospowrat_cdf(x, nn, m, a)

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

return

Contact us