You are on page 1of 9

Calaquian, Carl Alvin M.

Mondero, Raymond T.

whitelightercarl@gmail.com
rtmondero@yahoo.com

30
1.
x=[-2 4 -1 -3 5 8 2 -5]; t=0:length(x)1;
a. x(n)
stem(t-3, x);

c. x(-n+3)
stem(-(t-3)-3,x);

b. x(-n)
stem(-(t-3), x);

d. 3x(n+4)
stem((t-3)-4,3*x);

e. -2x(n-3)

g. 4x(3n-2)

stem((t-3)+3,-2*x);

stem((t-3)/3+2,4*x);

f. x(3n+2)
stem((t-3)/3-2,x);

2.

3.

x = [-2 0 -1 -3 1 2 -2 -3];

a.

t=0:length(x)-1;
stem(t-4,x)

a=[3 3 2]; roots(a)


ans =
-0.5000 + 0.6455i
-0.5000 - 0.6455i
b.
b=[4 -9 0 8 -10]; roots(b)
ans =
2.0649
-1.1204
0.6528 + 0.8090i
0.6528 - 0.8090i

h=[1 2 -1 1 -2];
t=0:length(h)-1;

4.

stem(t-4,h)

a.
A=[-5 -3 -5 -3]; poly(A)
ans =
1

16

94 240 225

b.
B=[4 3 5 -2];poly(B)
ans =
1 -10

23

34 -120

5.
a.
x=[4 2 -1 3]; y=poly([3 -2 1]);
[a,b,c]=residue(x,y)
a=

12.6000

>> Fs=11025;

-1.2667

>> mondero2=wavrecord(5*Fs,Fs,
'double');

-1.3333

b=

plot(mondero2)

3.0000
-2.0000
1.0000
c=
4

b.
[x,y]=residue(a,b,c)
c.

x=
4.0000

2.0000 -1.0000

3.0000

y=
1.0000 -2.0000 -5.0000
roots(y)
ans =

Give comments: The audio has some


background noise.
d.

6.0000

Npoint=512; Yfft=fft(mondero,Npoint);
w=(0:Npoint/2-1)/(Npoint/2*(Fs/2));
figure(2);plot(w,abs([Yfft(1:Npoint/2)'])
);

-2.0000
3.0000
1.0000

Yes it is similar to the original


equation.

6.a

7. Lowpass

a
fs=11025; fc=2000; w=fc/(fs/2);
[b,a]=fir1(6,w);zplane(b,a)
a=
1
b=
-0.0027 0.0426 0.2535
0.4130 0.2535 0.0426
-0.0027

b.
[b,a]=fir1(6,2* 2000/Fs);
yfilter=filter(b,a,mondero);
Npoint=512; Yfft=fft(yfilter,Npoint);
w=(0:Npoint/2-1)/(Npoint/2*(Fs/2));
figure(2);plot(w,abs([Yfft(1:Npoint/2)'])
);

impz(b,a)

Describe the waveform: The high


frequency signal was attenuated.
c.

freqz(b,a)

Play the audio and describe what


you hear: High pitch sound seems to
have been reduced..

8. Highpass
fs=11025; fc=1000; w=fc/(fs/2);
[b,a]=fir1(6,w,'high');zplane(b,a)
a=
1
b=
-0.0083 -0.0444 -0.1309
0.8103 -0.1309 -0.0444
-0.0083

b.
yfilter=filter(b,a,mondero2); Npoint=512;
Yfft=fft(yfilter,Npoint); w=(0:Npoint/2-1)/
(Npoint/2*(Fs/2));
figure(2);plot(w,abs([Yfft(1:Npoint/2)']));

impz(b,a)

Describe the waveform: The


magnitude of the low frequency signal
was attenuated compared to the
original waveform.
c.
Play the audio and describe what
you hear:
freqz(b,a)

Low pitch sound seems to have been


reduced.

9. Bandpass
[b,a]=fir1(30,2*[2500 3000]/
(Fs),'bandpass'); zplane(b,a)
a=
1
b=

freqz(b,a)

-0.0002 -0.0057 0.0004


0.0135 -0.0008 -0.0299
0.0013 0.0545 -0.0017
-0.0837 0.0017 0.1115
-0.0013 -0.1316 0.0005
0.1390 0.0005 -0.1316
-0.0013 0.1115 0.0017
-0.0837 -0.0017 0.0545
0.0013
-0.0299 -0.0008
0.0135 0.0004 -0.0057
-0.0002
b.
yfilter=filter(b,a,mondero2);
Npoint=512; Yfft=fft(yfilter,Npoint);
w=(0:Npoint/2-1)/(Npoint/2*(Fs/2));
figure(2);plot(w,abs([Yfft(1:Npoint/2)'])
);

impz(b,a)

Describe the waveform: Signals


outside the cutoff frequency was
attenuated.
c.
Play the audio and describe what
you hear:
Barely recognizable sound was heard.

impz(b,a)

10.
[b,a]=fir1(30,2*[1500 3000]/
(Fs),'stop');zplane(b,a)
a=
1
b=
-0.0004 0.0008 -0.0022
-0.0077 0.0004 0.0173
0.0095 -0.0072 0.0072
-0.0063 -0.0822 -0.0542
0.1415 0.1936 -0.0744
0.7290 -0.0744 0.1936
0.1415 -0.0542 -0.0822
-0.0063 0.0072 -0.0072
0.0095 0.0173 0.0004
-0.0077 -0.0022 0.0008
-0.0004

Freqz(b,a)

yfilter=filter(b,a,mondero2);
Npoint=512; Yfft=fft(yfilter,Npoint);
w=(0:Npoint/2-1)/(Npoint/2*(Fs/2));
figure(2);plot(w,abs([Yfft(1:Npoint/2)'])
);

Describe the waveform: Signals


inside the cutoff frequency was
attenuated.
c.
Play the audio and describe what
you hear:
We didnt noticed a significant
difference from the original recorded
sound.

You might also like