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

func(theta,a,b)
% func.m
% Note that the following is a seperate file named 'func.m'
% This returns a function which is the integrand of a
% proper integral (evaluated from 0 to 2*pi) that is
% used in computing Marcum's Q function.
%
%  Created by:  E. Homier, "Numerically Stable Computation of Marcum's Q Function", 4/20/99.
%

function y = func(theta,a,b)

y = exp(a.*b.*cos(theta))./(1+(a./b).^2-2*(a./b).*cos(theta));

return

Contact us