Advertisement
hiddenGem

Inductance in an RL Circuit

Jul 7th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.35 KB | None | 0 0
  1. %% Inductance in an RL Circuit
  2. % Determines the inductance in an RL Circuit
  3.  
  4. % Inputs and Variables
  5. V = input('What is the voltage in the battery?\n');
  6. Tau = input('What is the time constant?\n');
  7. I = input('What is the maximum current?\n');
  8.  
  9. % Outputs and Equations
  10. R = V*(1-exp(-t/Tau))/I;
  11. L = R*Tau;
  12. fprintf('The value of inductance is %.4e H', L)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement