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

reflpow_pdf(x, a, b, c)
% reflpow_pdf.m - evaluates a Reflected Power Probability Density.
%   DRM, "RPOCDF", Vol 1 Aux, NIST, 3/5/2008. 
%
%   Created by Jim Huntley,  11/19/09
%

function [pdf] = reflpow_pdf(x, a, b, c)

%persistent coef

%if(isempty(coef))
    coef = c / (b-a);
%end 

argx = (x-a) ./ (b-a);
pdf = coef .* (1-argx).^(c-1);

return

Contact us