Digital Signal Processing Reference
In-Depth Information
y=filter(b,a,u);
[sx,f]=spk(y,1);
subplot(221);plot(t,y);grid;
title('A')
xlabel(' Time ')
subplot(222);plot(f,sx);grid;
title('B')
xlabel(' Frequency ')
%title ('Fig 1.1');
pause;
%print -depsc f1_1;
%title('Fig 1.2');
%print -depsc f1_2;
pause;
% Broad band signal
fc=0.6; wn_upper=fc+fc*0.1; wn_lower=fc-fc*0.1;
wn=[wn_lower wn_upper];
[b,a]=butter(2,wn);
t=1:1000; u=randn(size(t));
y=filter(b,a,u);
[sx,f]=spk(y,1);
subplot(221);plot(t,y);grid;
title('A');
xlabel(' Time ')
subplot(222);plot(f,sx);grid;
title('B');
xlabel(' Frequency ')
pause;
%print -depsc f1_3;
%title('Fig 1.3')
%title ('Fig 1.4')
%print -depsc f1_4
A.1.2 Program f 1_56
%Digital Signal Processing:A Practitioner's Approach
%Dr.Kaluri Venkata Ranga Rao, kaluri@ieee.org
%Generates figure 1.3
% Generations of Signals for 1st Chapter
% 25th July 2003
clear;clf;
% Narrow Multi Band Signals
fc=0.3; wn_upper=fc+fc*0.005; wn_lower=fc-fc*0.005;
Search WWH ::




Custom Search