Coding wavelets the easy way

Subsampling


The subsampling operator is, in some way, the inverse of the zero insertion operator.
What it does is compute an output by extracting the values of the input that have an even index.
This cannot be described by the z-transform. In practice, the output "d" field changes when the start of the input is at an odd or even index.
We see that, if we perform a zero insertion and then a subsampling, we get the original signal.
Code this into a Matlab function file called "subsample.m". You may begin by writing a function file name "isodd.m" which outputs a zero if the integer input is even, and 1 if it is odd. Look at the "mod" Matlab keyword.

Summary


We have implemented the downward arrow in the diagram:

SubsampleBox