Question: fs = 1 0 3 . 4 e 3 ; Ts = 1 / fs; tlen = . 4 ; t = 0 :Ts:tlen -

fs=103.4e3;
Ts=1/fs;
tlen=.4;
t=0:Ts:tlen-Ts;
N=length(t);
x=sin(2*pi*f1*t);
standev=1;
noise=randn(1,N)*standev;
xn=x+noise;
Omegacf=0.004797*pi;
Omegao=0.02418*pi;
M=1001;
n=(0:M-1)-floor(M/2);
h=Omegacf/pi*sinc(n*Omegacf/pi);
w=hamming(M)';
A=1;
B=h.*w.*cos(n*Omegao);
y=filter(B,A,xn);
subplot(2,1,1)
plot(t,x,'LineWidth',3);
hold on
plot(t,xn,'LineWidth',1);
plot(t,y,'g','LineWidth',2);
axis([1/f1*1001/f1*110-44]);
xlabel('time,s');
ylabel('amplitude, arbitrary units');
legend('original signal','with noise','filtered');
hold off
X=fft(x);
Xn=fft(xn);
Y=fft(y);
subplot(2,1,2)
fbin=fs/N;
f=0:fbin:fs-fbin;
plot(f,20*log10(abs(X)),'LineWidth',3);
hold on
plot(f,20*log10(abs(Xn)),'LineWidth',1);
plot(f,20*log10(abs(Y)),'g','LineWidth',2);
xlabel('frequency, Hz');
ylabel('magnitude response, dB');
legend('noisy signal spectrum','filtered spectrum')
axis([1e2 fs/2-40100])
hold off
What band of frequencies will this filter keep?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!