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)
thomas parry
thomas parry el 27 de En. de 2019
Cerrada: Sabin el 6 de Oct. de 2023
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
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;
thomas parry
thomas parry el 27 de En. de 2019
Just a 2d plot of the current against time , to me it doesnt seem right because if i increase the time of the circuit the values you see after 30seconds dont seem right to me atall

Respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by