# Wavelet software description

Software for wavelet decomposition and reconstruction of signals Used wavelet is Daubechies D5

You can find here three Matlab functions (wvdecomp.m, wvreconstr.m i makewv.m) and one additional file (wvscal.mat) needed by two of these functions.

You can get help for each of these three functions e.g. writing: >> help wvdecomp this help will tell you exactly how to use a function.

WVDECOMP.M

The first function is WVDECOMP.M – it will work on data in the Matlab workspace. The data must be a array in which each column represents a signal you want to decompose. The output is “self explaining” cell array containing wavelet coefficients of signals (it will also show frequency ranges corresponding to each level of resolution). If you are going to use N levels of resolution than the length of your signal must be dividable by 2^N (and your signal should have additional 3*2^N points on both ends because on the ends there will be some errors (boundary effects)). This function needs a file wvscal.mat to be in the current directory, or in other directory to which the path is active in your Matlab (this file is needed for preliminary plots).

WVSCAL.MAT

This file contains ready D5 wavelet functions and corresponding scaling functions (as their computing on the base of coefficients is time consuming). Functions WVDECOMP.M and MAKEWV.M need this file to work properly.

You may analyze wavelet coefficients obtained by wvdecomp.m in many, many ways…

Each coefficient may be understood as a projection of the signal on wavelets of scaling functions.

MAKEWV.M

This function gives in the output wavelets or scaling function at a given level of dilation and given translation (you may plot it in the time scale of your signal).

You may also throw out (make them equal zero) some coefficients before reconstruction. Throwing out coefficients at given level means filtering out the frequencies corresponding to this level from the signal.

WVRECONSTR.M

After filtering (or other operations on the coefficients) you may reconstruct your signals using the function WVRECONSTR.M The full reconstruction (based on all coefficients) will not have a bigger relative error then 1/1000 besides 3*2^N points long ends of the signal (where N is a number of level used in decomposition).

EXAMPLARY LITERATURE

With se use of these functions (actually their previous versions) we analyzed evoked potentials from rats barrel cortex. The method and the results were described in: Wypych M., Kublik E., Wojdyłło P., Wróbel A. 2003. Sorting functional classes of evoked potentials by wavelets. Neuroinformatics 1: 193-202.(see also our laboratory website)