Matlab Circuit Analyse coding

2 次查看(过去 30 天)
Serhat UYANMIS
Serhat UYANMIS 2019-12-22
I am undergraduate student from Turkey, looking for advices that you may suggest me. 2.PNG
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.

回答(1 个)

Harikrishna Metta
Harikrishna Metta 2019-12-24
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.

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by