Calculate current in RLC using Euler

2 ビュー (過去 30 日間)
João Sacramento
João Sacramento 2018 年 5 月 29 日
編集済み: Nikhil Negi 2018 年 5 月 30 日
Following the second law of Kirchhoff I have the following equation for the current:
L(dI/dt)+RI=E
I know the following: E(t)=40sin(60t) L=1 henry R=2 ohms I(0)=1 A.
I have to calculate the current after 1 second using the explicit (also known as progressive) Euler's method. I've been looking around for codes and theory but I can't figure out how to do it, altho I know it's simple. Can someone help me out?

回答 (1 件)

Nikhil Negi
Nikhil Negi 2018 年 5 月 30 日
編集済み: Nikhil Negi 2018 年 5 月 30 日
Hello Joao,
if you can define this equation in matlab the following way.
syms i(t);
ode=diff(i,t)==40*sin(60*t)-2*i;
iSol(t)=dsolve(ode,i(0)==1);
then to find the value of i(1)
eval(i(1))
this method does not use Euler's method but rather find the equation for i(t) explicitly but if you want to be use Euler method only i would suggest you to look into this tutorial,

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

製品


リリース

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by