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

nig_pdf(x, alpha, bet, mu, delta)
% nig_pdf.m - evaluatess a Normal Inverse Gaussian Probability Density.
%   See "Modeling the Amplitude Statistics of Ultrasonic Images", 
%   T. Eltoft, U. Tromso, IEEE Trans. Med. imaging, Vol. 25, No. 2, February, 2006.
%
%   Vector Form of the PDF!!!
%
%  Created by Jim Huntley,  05/09/08
%

function [pdf] = nig_pdf(x, alpha, bet, mu, delta)

coef = alpha / pi;

arg = x - mu;
p = delta * sqrt(alpha^2 - bet^2) + bet.*arg;
q = sqrt(delta^2 + arg.^2) ./ delta;
pdf = coef .* exp(p) .* besselk(1,delta*alpha.*q) ./ q;

return

Contact us