rmean(3m)

NAME
rmean - Calculate running mean values from a vector

SYNOPSIS
[b, good] = rmean a(n )

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.

PARAMETERS

a   Vector of length N.

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

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.

AUTHORS
Pierre Jaccard, Geophysical Institute, University of Bergen, 1999