  1.  NAME

  rmean - Calculate running mean values from a vector

  2.  SYNOPSIS

  [b, good] = rmean a(n )

  3.  DESCRIPTION

  Calculates the mean value for each set of n consecutive elements in a
  , moving along the elements of a. Vector a may have NaN values.
  Calling with n less than one, the function will return the input array
  with NaN values removed and the mask to these values.

  4.  PARAMETERS

     a  Vector of length N.

     n  Number of subsequent elements to take into account for
        calculating mean values.

  5.  RETURNS

     b  Vector of length (N-2). Element b(i) is the mean value of the
        elements of a,starting from a(i).

     good optional
        Indexes to the elements of a that were used.

  6.  AUTHORS

  Pierre Jaccard, Geophysical Institute, University of Bergen, 1999

