Question

) (MATLAB) Assume a sampling rate of 100 Hz. Filter the signal given by x(t) = 1 + sin(0.125zt) + 0.5 sin(0.25mt) + 0.25 sin(

0 0
Add a comment Improve this question Transcribed image text
Answer #1

close all,
clear all,
clc,

Fs = 100;
t=0:(1/Fs):1;

x = 1 + sin(0.125 * pi * t) + 0.5*sin(0.25 * pi * t) + 0.25*sin(0.5 * pi * t) + 0.125*sin(pi * t);
subplot(4,1,1); plot(x); title('Original Signal, x = 1 + sin(0.125 * pi * t) + 0.5*sin(0.25 * pi * t) + 0.25*sin(0.5 * pi * t) + 0.125*sin(pi * t)');
grid on, ylim([-3,3]);

Order=2;

Fc = 5; Wn = Fc/(Fs/2);
b = fir1(Order,Wn,'low'); hd = dfilt.dffir(b);
y = filter(hd,x);
subplot(4,1,2); plot(y); grid on, ylim([-3,3]);
str = strcat('Filtered InputSignal, Fc = 5Hz'); title(str);

Fc = 0.5; Wn = Fc/(Fs/2);
b = fir1(Order,Wn,'low'); hd = dfilt.dffir(b);
y = filter(hd,x);
subplot(4,1,3); plot(y); grid on, ylim([-3,3]);
str = strcat('Filtered InputSignal, Fc = 0.5Hz'); title(str);

Fc = 0.05; Wn = Fc/(Fs/2);
b = fir1(Order,Wn,'low'); hd = dfilt.dffir(b);
y = filter(hd,x);
subplot(4,1,4); plot(y); grid on, ylim([-3,3]);
str = strcat('Filtered InputSignal, Fc = 0.05Hz'); title(str);

Ongin al Signal, x-1 + sinD 125° pi , t) + 0.5sinD·25° pi , t) + 0.25% in(.5 pi *) + 0.125,sin(pi *) 20 120 40 60 80 100 Fi

Add a comment
Know the answer?
Add Answer to:
) (MATLAB) Assume a sampling rate of 100 Hz. Filter the signal given by x(t) = 1 + sin(0.125zt) + 0.5 sin(0.25mt) + 0.25 sin(0.5zt) + 0.125 sin(nt) by filters of progressively lower cutoff frequen...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT