function s = statinit(n)
%  1.  NAME
%
%  statinit - Initialize statistics array
%
%  2.  SYNOPSIS
%
%  stat = statinit(n )
%
%  3.  DESCRIPTION
%
%  This Matlab function initializes the statistics array for the
%  specified number of variables. See stat(5m) for more information.
%
%  4.  PARAMETERS
%
%     n  Number of variables to use in the statistics.
%
%  5.  RETURNS
%
%     stat
%        Initialized statistics array.
%
%  6.  SEE ALSO
%
%  flagdata(3m)stat(5m)statcalc(3m)statinit(3m)statlim(3m)stat_str(3m)statupd(3m)
%
%  7.  AUTHORS
%
%  Pierre Jaccard, Geophysical Institute, University of Bergen, 1999
%

%--- Indexes:
min_ = 1; max_ = 2; imin_ = 3; imax_ = 4; mn_ = 5; sd_ = 6; n_ = 7;

%--- Initialize statistics:
st = zeros(n, 7);
st(:,min_) = Inf;
st(:,max_) = -Inf;

s = st;

return;


