Windowfilter
From Eigenvector Documentation Wiki
Contents |
Purpose
Spectral filtering.
Synopsis
- xf = windowfilter(x,win,options);
- xf = windowfilter(x,win,'algorithm');
Description
Rows of X are filtered using a windowed filtering. Note: To allow robust statistics the filter is based on a moving window (or box), and is slow compared to other filter methods.
Inputs
- x = data of class 'double' or 'dataset'.
- If 'dataset' it must x.type=='data' or 'image'.
- If 'double' it must be MxN.
- win = an odd integer corresponding to the window width of the filter.
Optional Inputs
- algorithm = an string which will be used as the options.algorithm input (only valid when options input is omitted)
Outputs
- xf = Filtered spectra class 'dataset'.
Options
options = a structure array with the following fields:
- plots: [ {'none'} | 'final' ] governs plotting of results, and
- algorithm: [ {'mean'} | 'median' | 'max' | 'min' | 'meantrimmed' | 'mediantrimmed' ] governs filter method.
- ntrim: when algorithm = 'meantrimmed' or 'mediantrimmed', (ntrim) is the input (n) to the functions MEANTRIMMED or MEDIANTRIMED {default = 2}.