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

ncchisqra_cdf(x,lambd1,lambd2,nu1,nu2)
% ncchisqra_cdf.m - compute Non-Central Chi-Square Ratio Cumulative Distribution Function.
%   See "Continuous Univariate Distributions", v.2, Johnson, Kotz, % Balakrishnan,
%   J. Wiley, p.472, 1996. 
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  8/03/07.
%

function [cdf] = ncchisqra_cdf(x,lambd1,lambd2,nu1,nu2)

% Integrate PDF to get CDF.
pdf = ncchisqra_pdf(x,lambd1,lambd2,nu1,nu2);
sx = size(x,2);
for jx = 1:sx
    cdf(jx) = simps(x(1:jx),pdf(1:jx));
end

return



Contact us