Advertisement
Past-chan

20191112 telecoms lab2

Nov 12th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.47 KB | None | 0 0
  1. >> f1 = [-2.5:0.001:2.5];
  2. >> y1=4*sinc(2*f1).^2-(sinc(f1)).^2;
  3. Undefined function 'sinc' for input arguments of
  4. type 'double'.
  5.  
  6. Did you mean:
  7. >> y1=4*(sin(pi*2*f1)/(pi*2*f1)).^2-(sin(pi*f1)/(pi*f1)).^2;
  8. >> t = [-4:0.2:4];
  9. >> y2 = [zeros(1,10), [0:0.2:1], ones(1,9), [1:-0.2:0], zeros(1,10)];
  10. >> subplot(211);
  11. >> plot(f1, abs(y1));
  12. >> subplot(212);
  13. >> plot(t, y2);
  14. >> y1=4*(sin(pi*2*f1)./(pi*2*f1)).^2-(sin(pi*f1)./(pi*f1)).^2;
  15. >> subplot(211);
  16. >> plot(f1, abs(y1));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement