Matlab Circuit Analyse coding
Mostrar comentarios más antiguos
I am undergraduate student from Turkey, looking for advices that you may suggest me. 

1.
Vs=150e-3;
L=750e-6;
for t=0:1:100;
i=(Vs*t)/L
plot(i,t)
xlabel('Current for t values ')
ylabel('Time values ')
end
2.
a=input('input t value for a specific time(milisecond format) ')
t=a*10^-3
if t<=0
L=50e-3;
vL=0;
C=0
i=100e-3
elseif t>=0 && t<=100e-3
for x=[0: 1e-3: 10e-3]
t=[0: 1e-3: 10e-3];
C=100e-3;
i=((-exp(-100*t))/50)+C;
vL=2*exp(-100*t);
plot(vL,i,'g')
end
else
for x=[100e-3: 1e-3:1]
t=[100e-3:1e-3:1];
C=1;
vL=-2*exp(-100*(t-0.1));
i=((exp(-100*(t-0.1)))/50)+C;
plot(vL,i,'c')
end
end
My codes are broken and can not satify the sketches that I am looking for.
Respuestas (1)
Harikrishna Metta
el 24 de Dic. de 2019
0 votos
Hello !
Current expression is not simply votage*t/L, it is actually intigration of voltage/L with respect to time. Derive proper current equations in time domain and apply the same for loop, you will see the results you want to see.
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!