You are on page 1of 1

%dirac(i)+0.

5*dirac(i-5)
%in Z transform 1+0.5*1/(z^5)
P1=[1 1 1 1 0.5];
[H, W]=freqz(P1,80);
figure,subplot(211),plot(W, abs(H)),title('Frequency response of the system
(module)'),ylabel('Amplitude'),xlabel('omega');
for i=1:1:9
x(i)=dirac(i)+0.5*dirac(i-5);
end
X=fft(x);
figure,subplot(221), stem(x), title('initial sequence');
subplot(222), stem(abs(X)), title('Discrete Fourier transform
module'),xlabel('k');
subplot(223),stem(angle(X)),title('DFT phase'),ylabel('Radians'),xlabel('k');

%H(z)=B/A=(1+z^1)/(1-0.5/z)*(1+0.25/z)
PB=[1 1];
PA1=[1 -0.5];
PA2=[1 +0.25];
B=PB;
A=conv(PA1,PA2);
% The Weighting function of the system is characterized by H (z) is computed
% and represented
[h,t]=impz(B,A);
figure,stem(t,h), title(' Weighting function '), ylabel('Amplitudine'),
xlabel('Time');
H=fft([h,t]);
figure,stem(abs(X)), title('Discrete Fourier transform module'),xlabel('k');

You might also like