Advertisement
makispaiktis

PSES - DFT2

Oct 23rd, 2020 (edited)
920
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.25 KB | None | 0 0
  1. f0 = 100;
  2. Fs = 250;
  3. N = 170;
  4. dt = 1 / Fs;
  5. n = [0:1:N-1];
  6. t = dt*n;
  7. x = cos(2*pi*f0*t);
  8. X = fft(x);
  9. stem(n, abs(X));
  10. hold on;
  11.  
  12. Fs = 270
  13. N = 180;
  14. dt = 1 / Fs;
  15. n = [0:1:N-1];
  16. t = dt*n;
  17. x = cos(2*pi*f0*t);
  18. X = fft(x);
  19. stem(n, abs(X));
  20.  
  21.  
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement