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

alphetamu_pdf(x, alpha, eta, mu)
% alphetamu_pdf.m - evaluates an Alpha-Eta-Mu Probability Density.
%   See "The Alpha - Eta - Mu and Alpha - Kappa - Mu Fading Distributions", 
%   g. Fraidenraich and M. D. Yacoub et al., U. Campinas, IEEE.
%
%  Created by Jim Huntley,  9/18/06
%

function [pdf] = alphetamu_pdf(x, alpha, eta, mu)

%persistent coef

%if(isempty(coef))
    %coef = alpha * (eta-1)^(0.5-mu) * (eta+1)^(0.5+mu) * sqrt(pi) * mu^(0.5+mu) ...
    %        / (sqrt(eta)*gamma(mu));
    coef = exp(log(alpha * (eta-1)^(0.5-mu) * (eta+1)^(0.5+mu) * sqrt(pi) * mu^(0.5+mu)) ...
        - (log(sqrt(eta)) + gammaln(mu)));
%end

pdf = coef * x^(alpha*(0.5+mu)-1) * besseli(mu-0.5,0.5*(eta^2-1)*mu*x^alpha/eta) ...
              / exp(0.5*(1+eta)^2*mu*x^alpha/eta);
   
return

Contact us