function f = quadratic_pdf(x,a,b)
%    f = quadratic_pdf(x,a,b)
% 
%    Return the PDF of a quadratic distribution with parameters a and b
%    with limits a < x < b, which must be scalars.

 f = zeros(size(x));

 idx = find( (a<x) & (x<b) );
 x = x(idx);

 f(idx) = 6 * (x-a).*(x-b) / (a-b)^3; 

% ----------------------------------------------------------  quadratic_pdf
% HP Gavin 2023-02-14
