SHARE
TWEET

pogrzeb kota

miknik97 Apr 10th, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //ZAD 1.
  2. clear
  3. clc
  4. n=0:1:15;
  5. A1=4.5;
  6. x1=A1*sin(2*%pi*n/16);
  7. subplot(4,2,1)
  8. plot(n,x1)
  9.  
  10. A2=3;
  11. W=6;
  12. x2=A2*sin(W*%pi*n/16);
  13. subplot(4,2,2)
  14. plot(n,x2)
  15.  
  16. x3=x1+x2;
  17. subplot(4,2,3)
  18. plot(n,x3)
  19.  
  20. x4=x1-x2;
  21. subplot(4,2,4)
  22. plot(n,x4)
  23.  
  24.  
  25.  
  26. n=0:1:255;
  27. A1=4.5;
  28. y1=A*sin(2*%pi*n/256);
  29. subplot(4,2,5)
  30. plot(n,y1)
  31.  
  32. A2=3;
  33. W=6;
  34. y2=A2*sin(W*%pi*n/256);
  35. subplot(4,2,6)
  36. plot(n,y2)
  37.  
  38. y3=y1+y2;
  39. subplot(4,2,7)
  40. plot(n,y3)
  41.  
  42. y4=y1-y2;
  43. subplot(4,2,8)
  44. plot(n,y4)
  45.  
  46. //ZAD 2.
  47. figure
  48. x5=fft(x3)
  49. subplot(2,1,1)
  50. plot(n,x5)
  51.  
  52. x6=fft(x4)
  53. subplot(2,1,2)
  54. plot(n,x6)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top