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

ogive_pdf(x, nn, a, b)
% ogive_pdf.m - evaluates an Ogive Probability Density.
%   See "Dataplot Reference Manual", Vol.1, Aux., NIST.
%
%  Created by Jim Huntley,  04/06/09
%
%   Vector form of the PDF!!!
%

function [pdf] = ogive_pdf(x, nn, a, b)

%persistent bma

%if(isempty(bma))
    bma = b - a;
%end

arg = (x - a) ./ bma;
pdf = nn .* arg.^(nn-1) .* ((4*nn-2)-(2*nn-2).*arg.^nn) ./ ((3*nn-1)*bma);

return

Contact us