Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. t=0:0.02:10;
  2. Fs=50;
  3. x1=sin(2*pi*t*2);
  4. x2=0.5*sin(2*pi*t*5);
  5. x3=0.5*exp(1-(t-1.5).^2/2*0.5*0.5);
  6. x=x1+x2+x3;
  7. XT=fftshift(fft(x));
  8. f=linspace(-Fs/2,Fs/2,length(t));
  9. WA=abs(XT);
  10. plot(f,WA);
  11. LP=1./(1+((f.*0.5)./(f.*f-2*2)).^10);
  12. new_x=ifft(ifftshift(XT.*LP));
  13. subplot(211), plot(t,x);
  14. subplot(212), plot(t,new_x);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement