Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Resonance Curve
- % Determines the resitance of an RLC circuit, the inductance when given
- % capacitance, and the power of the circuit at its resonance
- % Inputs and Variables
- Vrms = input('What is the voltage of the generator?\n');
- % These next two values should be given from a curve
- Irms = input('What is the value of I_RMS? \n');
- f = input('What is the frequency?\n');
- C = input('What is the capacitance?\n');
- % Outputs and Equations
- R = Vrms/Irms;
- L = 1/(4*pi^2*f^2*C);
- power = Vrms*Irms;
- fprintf(['The resistance, inductance, and power of the circuit are:\n',...
- '%.3e Ohm, %.4e H, and %.3f W\n '], R, L, power)
- %{
- This should go without saying but the values at which the curve intersects
- the graph should be at the point(frequency, I_RMS). This script works when
- the user gives the cooridnate points at the peak of the graph
- %}
Add Comment
Please, Sign In to add comment