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

mapairy_pdf(x)
% mapairy_pdf.m - compute the Map-Airy Probability Density Function.
%               See Eric W. Weisstein. "Map-Airy Distribution." 
%               From MathWorld--A Wolfram Web Resource. 
%               http://mathworld.wolfram.com/MapAiryDistribution.html
%
%       Vector form of PDF!!!
%
%  Created by:  Jim Huntley,  03/12/04.
%

function [pdf] = mapairy_pdf(x)

arg = x.^2;
pdf = 2.*exp(-2.*(x.^3)./3) .* (x.*airy(arg) - airy(1,arg));
for jx = 1:size(x,2)
    pdf(jx) = max(0,pdf(jx));
end

return



Contact us