Advertisement
Guest User

prosze bardzo

a guest
Apr 11th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scilab 0.36 KB | None | 0 0
  1. M=1000;
  2. t=[1:M]/M;
  3. N=generate_N(0,1,M);
  4. s=sin(2*%pi*10*t);
  5. U=fft(s+N);
  6. subplot(1,3,1)
  7. plot(t,abs(U),'.')
  8. subplot(1,3,2)
  9. plot(atan(imag(U)./real(U)),'.')
  10. subplot(1,3,3)
  11. plot(real(U),imag(U),'.')
  12. ///////////////////////////////
  13. p_0=150;
  14. U_1=U;
  15. U_1(abs(U_1)<p_0)=0;
  16. s_1=ifft(U_1);
  17. figure;
  18. subplot(2,1,1);
  19. plot(s+N);
  20. subplot(2,1,2);
  21. plot(s,'r')
  22. plot(s_1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement