Note: This page has been translated by MathWorks. Please click here

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Dyadic upsampling

`Y = dyadup(X,EVENODD)`

Y = dyadup(* X*)

Y = dyadup(

`X`

`EVENODD`

`'type'`

Y = dyadup(

`X`

`'type'`

`EVENODD`

Y = dyadup(

`X`

Y = dyaddown(X,1,'c')

Y = dyadup(

`X`

`'type'`

Y = dyadup(

`X`

`'type'`

Y = dyadup(

`X`

`EVENODD`

Y = dyadup(

`X`

`EVENODD`

`dyadup`

implements a
simple zero-padding scheme very useful in the wavelet reconstruction
algorithm.

`Y = dyadup(X,EVENODD)`

, where * X* is
a

`X`

`Y`

`EVENODD`

:If

is even, then`EVENODD`

`Y(2k–1) = X(k), Y(2k) = 0`

.If

is odd, then`EVENODD`

`Y(2k–1) = 0, Y(2k) = X(k)`

.

`Y = dyadup(`

is
equivalent to * X*)

`Y = dyadup(``X`

,1)

(odd-indexed
samples).`Y = dyadup(`

or * X*,

`EVENODD`

`'type'`

```
Y
= dyadup(
````X`

,`'type'`

,`EVENODD`

)

,
where `X`

`X`

Columns in | If |

Rows in | If |

Rows and columns in | If |

according to the parameter * EVENODD*,
which is as above.

If you omit the * EVENODD* or

`'type'`

`dyadup`

defaults to ```
EVENODD
= 1
```

(zeros in odd-indexed positions) and `'type'`

```
=
'c'
```

(insert columns).`Y = dyadup(`

is
equivalent to * X*)

`Y = dyaddown(X,1,'c')`

.`Y = dyadup(`

is
equivalent to * X*,

`'type'`

`Y = dyadup(``X`

,1,`'type'`

)

. `Y = dyadup(``X`

,`EVENODD`

)

is
equivalent to `Y = dyadup(``X`

,`EVENODD`

,'c')

.% For a vector. s = 1:5 s = 1 2 3 4 5 dse = dyadup(s) % Upsample elements at odd indices. dse = 0 1 0 2 0 3 0 4 0 5 0 % or equivalently dse = dyadup(s,1) dse = 0 1 0 2 0 3 0 4 0 5 0 dso = dyadup(s,0) % Upsample elements at even indices. dso = 1 0 2 0 3 0 4 0 5 % For a matrix. s = (1:2)'*(1:3) s = 1 2 3 2 4 6 der = dyadup(s,1,'r') % Upsample rows at even indices. der = 0 0 0 1 2 3 0 0 0 2 4 6 0 0 0 doc = dyadup(s,0,'c') % Upsample columns at odd indices. doc = 1 0 2 0 3 2 0 4 0 6 dem = dyadup(s,1,'m') % Upsample rows and columns % at even indices. dem = 0 0 0 0 0 0 0 0 1 0 2 0 3 0 0 0 0 0 0 0 0 0 2 0 4 0 6 0 0 0 0 0 0 0 0 % Using default values for dyadup and dyaddown, we have: % dyaddown(dyadup(s)) = s. s = 1:5 s = 1 2 3 4 5 uds = dyaddown(dyadup(s)) uds = 1 2 3 4 5 % In general reversed identity is false.

Strang, G.; T. Nguyen (1996), *Wavelets and Filter
Banks*, Wellesley-Cambridge Press.

Was this topic helpful?