Professional Documents
Culture Documents
DSP 154087
DSP 154087
code:
% first sinusoid
fs = 400
ts = 0:10:100
stem(ts,x1)
% second sinusoid
x2 = cos(2*3.14*340*ts/fs - pi/3)
stem(ts,x2)
%third sinsoid
x3 = cos(2*3.14*460*ts/fs + pi/3)
stem(ts,x3)
if it is converted back .
- in the second sinusoid the sampling frequency was less than twice the
component
continous time.
in the third sinusoid the sampling frequency is too lower than twice the
component frequency and alot of
aliasing will happen and majority of the original signal is lost and cant
be reconstructed back ,also we cant get
Third function
Question ( 3 ) :
n = 1:1:100
un1 = [ones(1,100)]
un2 = [zeros(1,29) ones(1,71)]
hold on
title('Rectangle pulse')
hold off
unn1 = [ones(1,100)]
% n-1 part
hold on
title('triangle pulse')
hold off
% sinusoidal pulse
uns1 = [ones(1,1000)]
% n-1 :
hold on
stem(n2,in3) % plot the input
title('sinusoidal pulse')
hold off
in the output plots appear they are related to the input derivative
the output result can be used to insert value to the left of a point and
code:
z = tf('z')
H = z^6/( z^6 - 0.5*z^5 + 0.2*z^4 - 0.1*z^3 + 0.007*z^2 + 0.14*z + 0.15)
num = [1]
den = [1,-0.5,0.2,-0.1,0.007,0.14,0.15]
respon = freqz(num,den,m)
plot(m,respon)
- there are 3 osciallations that means there are 3 conjugate poles and
because the oscialltions are kind of sharp
total poles = 6
Sketched Poles and zeros .