Dyadic downsampling.
Syntax
Y = dyaddown(X,evenodd)
Y = dyaddown(X)
Y = dyaddown(X,evenodd,'type')
Y = dyaddown(X,'type',evenodd)
Description
Y = dyaddown(X,evenodd), where X is a vector, returns a version of X that has been downsampled by 2. Whether Y contains the even- or odd-indexed samples of X depends on the value of positive integer evenodd:
If you omit the evenodd argument, dyaddown(X) defaults to evenodd = 0 (even-indexed samples).
Y = dyaddown(X,evenodd,'type') or Y = dyaddown(X,'type',evenodd), where X is a matrix, return a version of X obtained by suppressing:
Columns of X
|
If 'type' = 'c'
|
Rows of X
|
If 'type' = 'r'
|
Rows and columns of X)
|
If 'type' = 'm'
|
If you omit the evenodd or 'type' arguments, dyaddown defaults to
evenodd = 0 (even-indexed samples) and 'type' = 'c' (columns).
Examples
% For a vector.
s = 1:10
s =
1 2 3 4 5 6 7 8 9 10
dse = dyaddown(s) % Downsample elements with even indices.
dse =
2 4 6 8 10
% or equivalently
dse = dyaddown(s,0)
dse =
2 4 6 8 10
dso = dyaddown(s,1) % Downsample elements with odd indices.
dso =
1 3 5 7 9
% For a matrix.
s = (1:3)'*[1:4]
s =
1 2 3 4
2 4 6 8
3 6 9 12
dec = dyaddown(s,0,'c') % Downsample columns with even indices.
dec =
2 4
4 8
6 12
der = dyaddown(s,1,'r') % Downsample rows with odd indices.
der =
1 2 3 4
3 6 9 12
See Also
dyadup
References
G. Strang, T. Nguyen (1996), Wavelets and Filter Banks, Wellesley-Cambridge Press.
[ Previous | Help Desk | Next ]