function ttt = tpdf_klaus (x,u,sig,v)
%
%
% PURPOSE: returns density of the t distribution at x with mean "u", scale "sig" and dof "v"
%---------------------------------------------------
% INPUTS: 
%        x value of t variate for which pdf is sought, can be a vector
%        u = location or "mean"
%        sig = scale (not squared!)
%        v = degrees of freedom
%---------------------------------------------------
% OUTPUT:
%        a vector of length of x of density values correspondning to each element of x     
%
%
% written by:
% Klaus Moeltner
% University of Nevada, Reno


ttt=(gamma((v+1)/2)/(gamma(v/2)*sqrt(v*pi)*sig))*(1+(1/v)*((x-u)./sig).^2).^(-(v+1)/2);



