Matlab Circuit Analyse coding
古いコメントを表示
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.
回答 (1 件)
Harikrishna Metta
2019 年 12 月 24 日
0 投票
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.
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!