testing test
Member level 3
Hi,
I have first used the following code to generate a signal with two different sinusoid (it worked fine as shown after the code):
clc, clear all;
f1=20;
f2=80;
fs=200;
t=1:1024;
x=sin(2*pi*f1/fs*t)+sin(2*pi*f2/fs*t);
N=1024;
F=fft(x,N);
Fc=fftshift(F);
w=fs*(-N/2N/2)-1)/N;
plot(w,abs(Fc));
Then as shown in the attached image below, I designed a filter in fdatool.
After designing in fdatool, I returned to workspace and entered the following commands:
y=filter(Num,1,x);
plot(w,y);
This shown me an incorrect distorted filtered shown in figure below.
Please look into the issue. Thank you.
I have first used the following code to generate a signal with two different sinusoid (it worked fine as shown after the code):
clc, clear all;
f1=20;
f2=80;
fs=200;
t=1:1024;
x=sin(2*pi*f1/fs*t)+sin(2*pi*f2/fs*t);
N=1024;
F=fft(x,N);
Fc=fftshift(F);
w=fs*(-N/2N/2)-1)/N;
plot(w,abs(Fc));
Then as shown in the attached image below, I designed a filter in fdatool.
After designing in fdatool, I returned to workspace and entered the following commands:
y=filter(Num,1,x);
plot(w,y);
This shown me an incorrect distorted filtered shown in figure below.
Please look into the issue. Thank you.