Documentation of rave


Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)


Function Synopsis

y = rave ( x, n, usenan ) ;

Help text

 function y = rave ( x, n, usenan ) ;

  x = input matrix or vector
  n = number of points used in averaging, default is 5;
      when n < 0; cyclic boundary conditions are assumed
      otherwise, first and last values are repeated in averaging
-------------------------------------- Alexis Lau (Feb 1992)
  usenan = when set to true, missing boundary values are replaced
      by NaNs.
-------------------------------------- Alexis Lau (Feb 1993)

Cross-Reference Information

This function calls

Listing of function rave

function y = rave ( x, n, usenan ) ;
nd = ndims(x);
nsz = size(x);
x = reshape(x, nsz(1), prod(nsz(2:nd)));

if nargin == 3;
  y = myrunning_ave( x, n, usenan ) ;
elseif nargin == 2;
  y = myrunning_ave( x, n ) ;
elseif nargin == 1;
  y = myrunning_ave( x ) ;
else
  error(['Look at what you''re doing, dummy.'])
end

y = reshape(y, nsz);