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

slash_cdf(x)
% slash_cdf.m - compute Slash Cumulative Distribution Function.
%    See "Dataplot Reference Manual, SLACDF, NIST, 2/3/4. 
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  08/03/04.
%

function [cdf] = slash_cdf(x)

tol = 1e-8;
trace = [];
warning off MATLAB:quad:MinStepSize;

minx = min(x);

% Integrate PDF to get CDF.
for jz = 1:size(x,2)
    cdf(jz) = quad(@slash_pdf,minx,x(jz),tol,trace);
end

return



Contact us