解读matlab 之小波库函数
南京理工大学仪器科学与技术专业 谭彩铭
2010-4-2
使用的matlab 软件版本为matlab7.1
1 dwt 函数
dwt 函数是单尺度一维小波变换函数。
dwt 函数执行过程中调用了函数conv2,这个函数是运算的关键,需要首先明白conv2函数的执行过程。要明白conv2函数,需要先明白conv 函数。
对w = conv(u,v)运算 Let m = length(u) and n = length(v). Then w is the vector of length m+n-1 whose kth element is
式(1)
假设h=[h(1) h(2) h(3) h(4)],x=[x(1) x(2) x(3) x(4) x(5) x(6) x(7)],为更直接地表达y=conv(h,x)的计算过程,作如下示意图。其中length(y)=7+4-1。
图1
对c=conv2(a,b)运算
这里,a 和b 为一维或二维矩阵,其计算过程可由下式表示
1212121122(,)(,)(1,1)k k c n n a k k b n k n k =+-+-∑∑
式(2)
The size of c in each dimension is equal to the sum of the corresponding dimensions of the input matrices, minus one. That is, if the size of a is [ma,na] and the size of b is [mb,nb], then the size of
C is [ma+mb-1,na+nb-1].
其计算过程可以由下表表示