Advertisement
Guest User

Untitled

a guest
Sep 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.50 KB | None | 0 0
  1. R1=300; R2=100; C1=5e-6; C2=10e-6; C3=2e-6; L=1;
  2. f=logspace(0,3,300); omega=2*pi*f;
  3. ZL=j*omega*L; ZC1=1./(j*omega*C1); ZC2=1./(j*omega*C2);
  4. ZC3=1./(j*omega*C3); Z1=R1+ZL+ZC1;
  5. Z=R2+ZC2+Z1.*ZC3./(Z1+ZC3);
  6. loglog(f,abs(Z),'LineWidth',2);
  7. set(gca, 'FontSize', 14);
  8. xlabel('f (Hz)', 'FontSize',14); ylabel('|Z| (\Omega)','FontSize', 14);
  9. grid on;
  10. figure;
  11. semilogx(f,angle(Z)*180/pi,'LineWidth',2);
  12. set(gca, 'FontSize', 14);
  13. xlabel('f (Hz)', 'FontSize',14); ylabel('\phi (deg)', 'FontSize', 14);
  14. grid on;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement