view m-toolbox/classes/+utils/@math/Fpdf.m @ 51:9d5c88356247 database-connection-manager

Make unit tests database connection parameters configurable
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:24:37 +0100
parents f0afece42f48
children
line wrap: on
line source

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Compute F distribution function
% 
% CALL 
% 
% p = Fpdf(x,n1,n2);
% 
% 
% INPUT
% 
% - x, F values
% - n1, degree of freedom 1
% - n2, degree of freedom 2
% 
%   References:
%      [1]  M. Abramowitz and I. A. Stegun, "Handbook of Mathematical
%      Functions", Government Printing Office, 1964, 26.6.
%
% VERSION:     $Id: Fpdf.m,v 1.3 2011/03/07 16:56:29 congedo Exp $
%
% HISTORY:     24-02-2011 G. Congedo
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function p = Fpdf(x,n1,n2)

B = beta(n1/2,n2/2);
N = n1/n2;

p = 1/B*N^(n1/2).*x.^(n1/2-1).*(1+N.*x).^(-(n1+n2)/2);
% p = n1^(n1/2)*n2^(n2/2).*x.^(n1/2-1)./B./(n1.*x+n2).^((n1+n2)/2);

end