Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Power Dissipated by an RLC Circuit
- % Determines the power dissipated and the power factor at a specific
- % frequency
- % Inputs and Variables
- Vmax = input('What is the voltage?\n');
- C = input('What is the capacitance?\n');
- L = input('What is the inductance?\n');
- R = input('What is the resistance?\n');
- f = input('What is the frequency?\n');
- % Outputs and Equations
- w = 2*pi*f;
- VRMS = Vmax*.707;
- Xc = 1/(w*C);
- Xl = w*L;
- Z = sqrt(R^2+(Xl-Xc)^2);
- PF = R/Z;
- P = VRMS^2*PF/Z;
- fprintf('The power dissipated and the power factor are:\n %.3e W and %.3e \n', P, PF)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement