function k = kurtosis(x)
%KURTOSIS Kurtosis. 
%   For vectors, KURTOSIS(x) returns the sample kurtosis.  
%   For matrices, KURTOSIS(X)is a row vector containing the sample
%   kurtosis of each column. The kurtosis is the fourth central 
%   moment divided by fourth power of the standard deviation.
%
%   See also MEAN, MOMENT, STD, VAR, SKEWNESS.

%   B.A. Jones 2-6-96
%   Copyright (c) 1993-96 by The MathWorks, Inc.
%   $Revision: 1.3 $  $Date: 1996/03/05 14:51:29 $

[row, col] = size(x);

if row == 1 & col == 1
    k = 0;
else
   m4 = moment(x,4);
   sm2 = sqrt(moment(x,2));
   k = m4./sm2.^4;
end
   
