Digital Signal Processing Reference
In-Depth Information
y(i)=xk;x(i)=i;
end
subplot(212); stem(x,y);grid
text(xp,yp,'1.8000 2.2400 2.2320 1.7776 0.9677-0.0358 -1.0321');
text(xp,yp,'-1.8220 -2.2475 -2.2235 -1.7548 -0.9351 0.0715 1.0639');
%[xp,yp] =ginput (1);
text(xp,yp,'1.8435 2.2544 2.2144 1.7315 0.9023 -0.1073');
%[xp,yp]=ginput(1) ;text(xp,yp,' Fig 3.1 ')
print -depsc f3_2
A.3.4 Program f 3_3
%Digital Signal Processing:A Practitioner's Approach
%Dr.Kaluri Venkata Ranga Rao, kaluri@ieee.org
%Generates figure 3.10
clear;close;
r=0.95;f=0.2;
a=[1 -2*r*cos(2*pi*f) r*r] ;
b=[1 0 -1];b=b*(1-r*r)*0.5;N=360;
fn=linspace(0,0.5,N);
sysd=tf(b,a,1);
m=abs(freqz(b,a,N));
phi=angle(freqz(b,a,N))*180/pi;phi=phi/180;
subplot(211);plot(fn,m,fn,phi);grid;
[xp,yp]=ginput(1);text(xp,yp,'
< --- Phase +90 to -90 deg ')
[xp,yp]=ginput(1);text(xp,yp,'
< --- Amplitude Spectrrum ')
print -depsc f3_3
A.3.5 Program f 3_45
%Digital Signal Processing:A Practitioner's Approach
%Dr.Kaluri Venkata Ranga Rao, kaluri@ieee.org
%Generates figures 3.11,3.12
clear;close;
N=50;
fn=linspace(0,0.5,N);
rmin=0.3;rmax=0.95;
R=linspace(rmin,rmax,N);
for k=1:N
r=R(k);
f=0.2;
p=2*r*cos(2*pi*f);
Search WWH ::




Custom Search