Coding wavelets the easy way

Fetch and display a signal


This tutorial is on signal processing with wavelets, so we will need a signal to work on. First you need to download the signal to your Matlab working folder. It is a numerical file in Matlab format.
Then do a "clear all" command if you have worked previously in Matlab.
To load the signal file into the Matlab workspace, use the load command (see "help load") for the file name of the downloaded Matlab file, which is "PieceRegSig". This will create a vector variable named "sig" into the workspace, with length 1024 (wavelets love powers of 2).
Now we want to plot the signal. To do so, use the "plot" function.
You should understand why the file is called PieceRegSig, the signal is indeed a piecewise regular signal, with isolated singularities. Wavelets are good at handling such signals.

The solution of this exercise is here.

If you want to know more about plotting figures in Matlab, I suggest you have look at the help for the "figure" and "hold" keywords of Matlab.

Summary


We have loaded a numerical file into the Matlab workspace. Since it is a vector variable, we can display it graphically using the simplest form of the "plot" function.