Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all;
- close all;
- omega = pi/40;
- N = 80;
- t = 0:N-1;
- s = 0.5*sin(omega*t) + 0.4*sin(2*omega*t)+ 0.1*sin(5*omega*t);
- plot(t,s);
- subplot(6, 1, 1), plot(t, s);
- s1 = sin(omega * t);
- subplot(6, 1, 2), plot(t, s1);
- s2 = sin(2 * omega * t);
- subplot(6, 1, 3), plot(t, s2);
- s3 = sin(3 * omega * t);
- subplot(6, 1, 4), plot(t, s3);
- s4 = sin(4 * omega * t);
- subplot(6, 1, 5), plot(t, s4);
- s5 = sin(5 * omega * t);
- subplot(6, 1, 6), plot(t, s5);
- fprintf('<s, s1> = %f\n',s*s1' );
- fprintf('<s, s2> = %f\n',s*s2' );
- fprintf('<s, s3> = %f\n',s*s3' );
- fprintf('<s, s4> = %f\n',s*s4' );
- fprintf('<s, s5> = %f\n',s*s5' );
- fprintf('no errors found , good job!');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement