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

sqline_pdf(x)
% sqline_pdf.m - evaluates a Square Line Picking Probability Density Function.
%   See web, "http://mathworld.wolfram.com/SquareLinePicking.html".
%
%  Created by Jim Huntley,  09/30/05
%
%

function [pdf] = sqline_pdf(x)

if(x >= 0 & x <= 1)
    pdf = 2 * x * (x^2-4*x+pi);
elseif(x > 1 & x <= sqrt(2))
    pdf = 2 * x * (4*sqrt(x^2-1)-(x^2+2-pi)-4*atan(sqrt(x^2-1)));
end

return

Contact us