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

rtrunray_pdf(x, sigma, D)
% rtrunray_pdf.m - tests a Right-Truncated Rayleigh Probability Density.
%   See "CFAR for Homogeneous Part of High-resolution Imagery", G. W. Lank et al., 
%   IEEE Trans Aerospace and Electronic Sys., Vol. 28, No. 2, April, 1992. 
%
%   Created by Jim Huntley,  11/20/09
%

function [pdf] = rtrunray_pdf(x, sigma, D)

%persistent coef sigmasq

%if(isempty(coef))
    sigmasq = sigma^2;
    coef = 1 / (1-exp(-0.5*D^2/sigmasq));
%end

pdf = coef .* x .* exp(-0.5.*x.^2/sigmasq) / sigmasq;

return

Contact us