reverse-shooting

Matlab scripts for reverse shooting
Log | Files | Refs | README

tpdf.m (254B)


      1 % tpdf.m  -- The t-distribution pdf (from Larsen & Marx, p338ff).
      2 %  Use the gamma function defined in Matlab
      3 %  z = ordinate
      4 %  n = dof 
      5 
      6 function pdf=tpdf(z,n);
      7 
      8 pdf1=gamma((n+1)/2);
      9 pdf2=sqrt(n*pi)*gamma(n/2)*(1+(z.^2)/n).^((n+1)/2);
     10 
     11 pdf=pdf1./pdf2;