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

circnorm_pdf(x, k, theta)
% circnorm_pdf.m - evaluates a Circular Normal Probability Density.
%   See "Continuous Univariate Distributions", v.1, Johnson, Kotz, & Balakrishnan, 
%   J. Wiley, 1995, p.172.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  7/12/07
%

function [pdf] = circnorm_pdf(x, k, theta)

%persistent coef

%if(isempty(coef))
    coef = 1 / (2*pi*besseli(0,k));
%end

pdf = coef .* exp(k.*cos(x-theta));    
    
return

Contact us