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

stsd2_cdf(x, k)
% stsd2_cdf.m - evaluatess a Sort-Tail Symmetric II Cumulative Distribution.
%   See "Robust Estimation and Hypothesis Testing Under Short-Tailedness And Inliers",
%   A.D. Akkaya and M.L. Tiku, Sociedad de Estadistica e Investigacion Operativa Test 
%   2005, Vol. 14, No. 1, pp.129-150.
%
%  Created by Jim Huntley,  12/06/07
%

function [cdf] = stsd2_cdf(x, k)

%persistent coef

%if(isempty(coef))
    coef = k * 2^(k-1);
%end

for jx = 1:size(x,2)
    if(x(jx) < 0.5)
        cdf(jx) = coef * x(jx)^k / k;
    elseif(x(jx) >= 0.5)
        cdf(jx) = 1 - coef*(1-x(jx))^k / k;
    end
end

return

Contact us