Advertisement
gogetek

Untitled

Nov 28th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.39 KB | None | 0 0
  1. close all;
  2. clear;
  3.  
  4. f = 1;
  5. w = 2 * pi * f;
  6. t = linspace(0, 3 / f, 100);
  7. Ui = sin(w * t);
  8. L = 1 * 10 ^ (-4);
  9. C = 22 * 10 ^ (-6);
  10.  
  11. filter = [];
  12.  
  13. for f=1:10000
  14.     w = 2 * pi * f;
  15.     Ui = sin(w * t);
  16.     Uo = (Ui * w ^ 2 * L * C) / (w ^ 2 * L * C - 1);
  17.  
  18. %plot(t, Ui);
  19. %hold on
  20. %plot(t, Uo);
  21. %legend('Ui', 'Uo');
  22.  
  23.     filter = [filter, max(Uo) / max(Ui)];
  24. end
  25.  
  26. plot(dB(filter))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement