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

voigt_pdf(x, gama, sigma)
% voigt_pdf.m - evaluates an Voigt Probability Density.
%   See web, "http://wn.wikipedia.org.wiki/Voigt_profile". 
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley, 09/29/05
%
%   Calls: 'complexerrorfunc.m'
%

function [pdf] = voigt_pdf(x, gama, sigma)

denom = sigma*sqrt(2*pi);
denom2 = sigma*sqrt(2);
sx = size(x,2);

for jx = 1:sx
    arg = (x(jx) + i*gama) / denom2;
    warg = complexerrorfunc(arg);
    pdf(jx) = real(warg) / denom;
end 

return

Contact us