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

weibrice_cdf(x,c,A)
% weibrice_cdf.m - compute Weibull Rice Cumulative Distribution Function.
%   See "Continuous Univariate Distributions", Johnson, Kotz, and Balakrishnan,
%   J. Wiley, v.1, p.693, 1995.
%
%  Created by Jim Huntley,  10/22/07
%
%   Calls 'simps.m'
%

function [cdf] = weibrice_cdf(x,c,A)

pdf = weibrice_pdf(x,c,A);
sx = size(x,2);
dx = x(2) - x(1);
for jx = 1:sx
    if(jx < 3)
        cdf(jx) = trapz(pdf(1:jx)) * dx;
    elseif(jx >= 3)
        cdf(jx) = simps(pdf(1:jx)) * dx;
    end
end

return



Contact us