rmean

Last updated Tue Sep 21 21:36:23 1999


Calculate running mean values from a vector

1. SYNOPSIS

[b, good] = rmean a(n )

2. 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.

3. PARAMETERS



a

Vector of length N.



n

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

4. 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.

5. AUTHORS

Pierre Jaccard, Geophysical Institute, University of Bergen, 1999