Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Current in RL Circuit
- % Determines the maximum current in the circuit and the current at a
- % specific time
- % Inputs and Variables
- R = input('What is the resistance in the circuit?\n');
- L = input('What is the value of inductance?\n ');
- V = input('What is the voltage?\n');
- t = input('What is the specific time?\n');
- % Outputs and Equations
- Imax = V/R;
- Tau = L/R;
- I = V*(1-exp(-t/Tau))/R;
- fprintf('The maximum current is %.4e A and the specific current is %.4e A \n', Imax, I)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement