Wavelet Toolbox |
Syntax
Description
The valid extension types (TYPE) are listed in the table below.
TYPE |
Description |
1, '1', '1d' or '1D' |
1-D extension |
2, '2', '2d' or '2D' |
2-D extension |
'ar' or 'addrow' |
Add rows |
'ac' or 'addcol' |
Add columns |
The valid extension modes (MODE) are listed in the table below.
LOC = 'l' (or 'u') for left (or up) extension.
LOC = 'r' (or 'd') for right (or down) extension.
LOC = [LOCROW,LOCCOL]
where LOCROW
and LOCCOL
are 1D extension locations or 'n' (none).
L = [LROW,LCOL]
where LROW
is the number of rows to add and LCOL
is the number of columns to add.
For more information on symmetric extension modes see "References".
Examples
% Original signal. x = [1 2 3] x = 1 2 3 % 1-D extension length. l = 2; % Zero-padding extensions 1-D. xextzpd1 = wextend('1','zpd',x,l) xextzpd1 = 0 0 1 2 3 0 0 xextzpd2 = wextend('1D','zpd',x,l,'b') xextzpd2 = 0 0 1 2 3 0 0 % Symmetric extension 1-D. xextsym = wextend('1D','sym',x,l) xextsym = 2 1 1 2 3 3 2 % Periodic extension 1-D. xextper = wextend('1D','per',x,l) xextper = 3 3 1 2 3 3 1 2 % Original image. X = [1 2 3;4 5 6] X = 1 2 3 4 5 6 % 2-D extension length. l = 2; % Zero-padding extension 2-D. Xextzpd = wextend(2,'zpd',X,l) Xextzpd = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 0 0 0 0 4 5 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 % Symmetric extension 2-D. Xextsym = wextend('2D','sym',X,l) Xextsym = 5 4 4 5 6 6 5 2 1 1 2 3 3 2 2 1 1 2 3 3 2 5 4 4 5 6 6 5 5 4 4 5 6 6 5 2 1 1 2 3 3 2
References
Strang, G.; T. Nguyen (1996), Wavelets and filter banks, Wellesley- Cambridge Press.
wentropy | wfbm |
© 1994-2005 The MathWorks, Inc.