Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Current in a RLC circuit
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Ive done a code but it doesnt seem quite right to me
its to display the current in the circuit over a period of time
grateful for any help
vm=240;
f=50;
r=5;
l=0.004;
c=0.0015;
t=0:0.001:0.04;
for k=1:length(t)
omegat=2*pi*f*t(k);
v(k)=vm*sin(omegat);
z(k)=sqrt(r^2+(omegat*l-1/(omegat*c))^2);
i(k)=v(k)/z(k);
end;
plot(t, i);grid;
2 comentarios
Stephan
el 27 de En. de 2019
What result do you expect? Your code runs without errors - the for loop is not needed:
vm=240;
f=50;
r=5;
l=0.004;
c=0.0015;
t=0:1/(100*f):0.04;
omegat=2*pi*f.*t;
v=vm.*sin(omegat);
z=sqrt(r^2+(omegat.*l-1./(omegat.*c)).^2);
i=v./z;
plot(t, i);
grid;
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!