Windowfilter: Difference between revisions
Jump to navigation
Jump to search
imported>Scott (Created page with "===Purpose=== Spectral filtering. ===Synopsis=== :xf = windowfilter(x,win,options); :xf = windowfilter(x,win,'algorithm'); ===Description=== Rows of X are filtered using a window...") |
imported>Scott |
||
Line 19: | Line 19: | ||
===Options=== | ===Options=== | ||
options = a structure array with the following fields: | options = a structure array with the following fields: | ||
* ''' | * '''display''': [ {'on'} | 'off' ], governs level of display, | ||
* '''algorithm''': [ {'mean'} | 'median' | 'max' | 'min' | 'meantrimmed' | 'mediantrimmed' ] governs filter method. | * '''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}. | * '''ntrim''': when algorithm = 'meantrimmed' or 'mediantrimmed', (ntrim) is the input (n) to the functions MEANTRIMMED or MEDIANTRIMED {default = 2}. | ||
===See Also=== | ===See Also=== | ||
[[line_filter]], [[box_filter]] | [[line_filter]], [[box_filter]] |
Revision as of 14:15, 10 June 2014
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:
- display: [ {'on'} | 'off' ], governs level of display,
- 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}.