www.pudn.com > 现代信号处理教程.rar > exa070803.m


%----------------------------------------------------------------------------------- 
% exa070803.m    for example 7.8.3 and fig7.8.6 
% to explain how to design a biorthogonal FB by Lattice structure; 
% h0(n),h1(n): From [Ngu89] 
%----------------------------------------------------------------------------------- 
clear all; 
 
p0=[4.5677057793319E-1,1.4064635171445E-1,-9.3506916444599E-2,-5.2720604380285E-2,..., 
   5.0150998969974E-2,2.7807655367843E-2,-3.1588256584766E-2,-1.6072095730447E-2,..., 
   2.0342217498768E-2,9.5185739377873E-3,-1.2745794143760E-2,-5.7266129912836E-3,..., 
   7.6713479773340E-3,3.5887675000538E-3,-4.1596794940782E-3,-2.5292916536995E-3,..., 
   1.8133626090971E-3,2.1821453210951E-3,-8.8586614964934E-4,-1.7113555648237E-3,..., 
   1.6949632352623E-4,9.0093326906975E-4,6.0057015567620E-5,-3.1420371203276E-4,..., 
   4.4822758623806E-4,-5.4844133513744E-4,7.3072834050915E-5,-3.8484265421346E-4,...' 
   1.5395771337727E-6,-9.0320483808830E-6,4.6974270887493E-9,-2.8047649315578E-8]; 
p1=[-4.7085951885497E-1,1.2541814981813E-1,1.0590613371084E-1,-3.6911412178463E-2,..., 
    -6.0718905144588E-2,1.2025400363970E-2,3.9969783616942E-2,-1.0169910794786E-3,..., 
    -2.7168914395689E-2,-4.2379770697116E-3,1.8004225149880E-2,6.2975034654359E-3,..., 
    -1.0972495757049E-2,-6.2739942846780E-3,6.1298978924939E-3,5.2062396452593E-3,..., 
    -3.2204697559136E-3,-3.9203746653654E-3,1.3763566255439E-3,2.6665204377661E-3,..., 
    -5.3867082067374E-4,-9.6019269511046E-4,4.6300165292477E-4,-2.9314605847016E-6,..., 
    -3.4610132423983E-4,3.3979745779936E-5,-7.0105005042002E-5,3.6797322378863E-4,..., 
    -1.5142595131503E-6,8.8828615641826E-6,-4.6394634766867E-9,2.7701557075405E-8]; 
N=length(p0); 
for i=1:N 
    h0(i)=p0(N+1-i); 
    h0(N+i)=p0(i); 
    h1(i)=-p1(N+1-i); 
    h1(N+i)=p1(i); 
end 
 
save h0  
h1 
 
subplot(221) 
stem(h0,'k.');grid; 
subplot(222) 
stem(h1,'k.');grid 
 
N0=512;Fs=1; 
a=1; 
[H0,w]= freqz(h0,a,N0,Fs); 
[H1,w]= freqz(h1,a,N0,Fs); 
absH0=abs(H0); 
absH1=abs(H1); 
 
subplot(223) 
ah0=20*log10(absH0+0.000000001); 
ah1=20*log10(absH1+0.000000001); 
plot(w,ah0,'k-',w,ah1,'b-'); 
grid on; 
 
sumh=absH0.*absH0+absH1.*absH1; 
sum=10*log10(sumh); 
subplot(224) 
plot(w,sum);grid;