fwt_ti.sci

来自「小波分解源代码」· SCI 代码 · 共 38 行

SCI
38
字号
function wp = FWT_TI(x,L,qmf)
// FWT_TI -- translation invariant forward wavelet transform
//  Usage
//    TIWT = FWT_TI(x,L,qmf) 
//  Inputs
//    x        array of dyadic length n=2^J
//    L        degree of coarsest scale
//    qmf      orthonormal quadrature mirror filter 
//  Outputs
//    TIWT     stationary wavelet transform table
//             formally same data structure as packet table
//
//  See Also
//    IWT_TI
//
//  Copyright Aldo I Maalouf

	[n,J] = dyadlength(x);
	D = J-L;
	wp = zeros(n,D+1);
	x = ShapeAsRow(x);
//
	wp(:,1) = x';
	for d=0:(D-1),
		for b=0:(2^d-1),
		   s = wp(packet(d,b,n),1)';
		   hsr = DownDyadHi(s,qmf);
		   hsl = DownDyadHi(rshift(s),qmf);
		   lsr = DownDyadLo(s,qmf);
		   lsl = DownDyadLo(rshift(s),qmf);
		   wp(packet(d+1,2*b  ,n),d+2) = hsr';
		   wp(packet(d+1,2*b+1,n),d+2) = hsl';
		   wp(packet(d+1,2*b  ,n),1  ) = lsr';
		   wp(packet(d+1,2*b+1,n),1  ) = lsl';		   
		 end
	end
endfunction

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?