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

slash_pdf(x)
% slash_pdf.m - evaluates a Slash Probability Density.
%   See "Dataplot Reference Manual, SLAPDF", NIST, 2/03/04.
%
%  Created by Jim Huntley,  8/03/04
%

function [pdf] = slash_pdf(x)

% Loop over each element in x.
for jx = 1:size(x,2)
	if(abs(x(jx)) < eps)
        pdf(jx) = 0.5*gaus_pdf(x(jx),0,1);
	else
        pdf(jx) = (gaus_pdf(0,0,1) - gaus_pdf(x(jx),0,1))/x(jx).^2;
	end
end

return

Contact us