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

chi_pdf(x, nu)
% chi_pdf.m - evaluates the Chi Probability Density Function.  
%                See "Dataplot Reference Manual", CHCDF, AUX-93, NIST, 3/25/97.
%
%  Created by:  Jim Huntley,  03/03/05.
%

function [pdf] = chi_pdf(x, nu)

%persistent coef

%if(isempty(coef))
    coef = 2^(1-0.5*nu);
%end

pdf = coef * exp(-0.5*x^2) * x^(nu-1);

return

Contact us