Advertisement
hiddenGem

Current in a Purely Capacitive AC Circuit

Jul 16th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.48 KB | None | 0 0
  1. %% Current in a Purely Capacitive AC Circuit
  2. % Determines the RMS current in an AC circuit
  3.  
  4. % Inputs and Variables
  5. omega = input('What is the angular frequency in rad/s?\n');
  6. DeltaVmax = input('What is the maximum voltage?\n');
  7. C = input('What is the capacitance ?\n');
  8.  
  9. % Outputs and Equations
  10. Irms = DeltaVmax*omega*C/sqrt(2);
  11. fprintf('The RMS current is %.4e A\n', Irms)
  12.  
  13. %{
  14. If given the angular frequency with respect to pi, the user must input
  15. value*pi ex. 122*pi
  16. %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement