Global Index (short | long) | Local contents | Local Index (short | long)
y = rave ( x, n, usenan ) ;
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)
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);