Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

dipole_pdf(x, a, b)
% dipole_pdf.m - evaluates a Dipole Probability Density Function.
%   See FORTRAN code: prob_f90, John Burkhardt, 12/19/99.
%  Translated/Modified by Jim Huntley,  03/10/04

function [pdf] = dipole_pdf(x, a, b)

pdf = 1/(pi*(1+x^2)) + b^2 * ((1- x^2)*cos(2*a) + 2*x*sin(2*a)) / (pi*(1+x^2)^2);


Contact us