daily pastebin goal
47%
SHARE
TWEET

afe346sd

a guest Oct 18th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clear all;
  2. close all;
  3.  
  4. omega = pi/40;
  5. N = 80;
  6. t = 0:N-1;
  7.  
  8. s = 0.5*sin(omega*t) + 0.4*sin(2*omega*t)+ 0.1*sin(5*omega*t);
  9. plot(t,s);
  10. subplot(6, 1, 1), plot(t, s);
  11.  
  12. s1 = sin(omega * t);
  13. subplot(6, 1, 2), plot(t, s1);
  14.  
  15. s2 = sin(2 * omega * t);
  16. subplot(6, 1, 3), plot(t, s2);
  17.  
  18. s3 = sin(3 * omega * t);
  19. subplot(6, 1, 4), plot(t, s3);
  20.  
  21. s4 = sin(4 * omega * t);
  22. subplot(6, 1, 5), plot(t, s4);
  23.  
  24. s5 = sin(5 * omega * t);
  25. subplot(6, 1, 6), plot(t, s5);
  26.  
  27.  
  28.  
  29. fprintf('<s, s1> = %f\n',s*s1' );
  30. fprintf('<s, s2> = %f\n',s*s2' );
  31. fprintf('<s, s3> = %f\n',s*s3' );
  32. fprintf('<s, s4> = %f\n',s*s4' );
  33. fprintf('<s, s5> = %f\n',s*s5' );
  34. fprintf('no errors found , good job!');
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