小波滤波器构造和消噪程序(2 个) 1.重构 % mallet_w avelet
m % 此函数用于研究 Mallet 算法及滤波器设计 % 此函数仅用于消噪 a=pi/8; %角度赋初值 b=pi/8; %低通重构FIR 滤波器h0(n)冲激响应赋值 h0=cos(a)*cos(b); h1=sin(a)*cos(b); h2=-sin(a)*sin(b); h3=cos(a)*sin(b); low _construct=[h0,h1,h2,h3]; L_fre=4; %滤波器长度 low _decompose=low _construct(end:-1:1); %确定 h0(-n),低通分解滤波器 for i_high=1:L_fre; %确定 h1(n)=(-1)^n,高通重建滤波器 if(mod(i_high,2)==0); coefficient=-1; else coefficient=1; end high_construct(1,i_high)=low_decompose(1,i_high)*coefficient; end high_decompose=high_construct(end:-1:1); %高通分解滤波器h1(-n) L_signal=100; %信号长度 n=1:L_signal; %信号赋值 f=10; t=0
001; y=10*cos(2*pi*50*n*t)
*exp(-20*n*t); figure(1); plot(y); title('原信号'); check1=sum(high_decompose); %h0(n)性质校验 check2=sum(low_decompose); check3=norm(high_decompose); check4=norm(low_decompose); l_fre=