VFILT Filtering along rows without change in length. Y=VFILT(X,FILTER) convolves FILTER with X along their rows and crops the result Y to be the same length as X. If FILTER is a number, a Hanning filter of that length is used. [Y1,Y2,...YN]=VFILT(X1,X2,...XN,FILTER) also works. The input arrays XI may have any dimensionality. VFILT(X1,X2,...XN,FILTER); with no output arguments overwrites the original input variables. ___________________________________________________________________ Median filter VFILT can also be used to implement a sliding-window median filter. Y=VFILT(...,N,'median') returns the median in a window of length N centered on the current point. If N is even, N+1 is used for the window length. Y will be the same length as X. The median filter is sensibly defined with an implicit "boxcar" filter. VFILT(...,FILTER,'median') with some other filter input will therefore use a sliding window of length LENGTH(FILTER), ignoring FILTER itself. ___________________________________________________________________ Boundary conditions Y=VFILT(..., STR), where STR is a string, optionally specifies the boundary condition to be imposed at the edges of the time series. Valid options for STR are STR = 'zeros' or 'nonans' for zero-padding beyond endpoints STR = 'nan' for zero-padding beyond the endpoints, setting contaminated points near the edges to NaNs STR = 'periodic' for periodic boundary conditions STR = 'mirror' for reflecting the time series at both ends By default, STR='nan', implying that the roughly length(FILTER)/2 data points on each end of Y which are contaminated by edge effects are replaced with NANs. All boundary conditions take into account potential blocks of missing data, marked by NaNs, at beginning and end of each column. ___________________________________________________________________ 'vfilt --t' runs a test. Usage: y=vfilt(x,filter); y=vfilt(x,filter,'zeros'); y=vfilt(x,N,'median,'zeros'); [y1,y2,y3]=vfilt(x1,x2,x3,filter); __________________________________________________________________ This is part of JLAB --- type 'help jlab' for more information (C) 2000--2014 J.M. Lilly --- type 'help jlab_license' for details