solving a differential equation

1 回表示 (過去 30 日間)
Amjad Green
Amjad Green 2018 年 5 月 5 日
コメント済み: Torsten 2018 年 5 月 7 日
how do i solve it
  4 件のコメント
Walter Roberson
Walter Roberson 2018 年 5 月 5 日
What is sunplot ? Did they mean subplot ?
The timespan and initial conditions should not be in quotes. Also it is better to use function handles than quoted function names
[t, v] = ode45(@amjad1, 0:8, [10 0])
Torsten
Torsten 2018 年 5 月 7 日
vdot(2)=(-1/(R*C))*v(2)-(1/(L*C)*v(1));
instead of
vdot(2)=(-1/(R*C))*v(2)-(1/(L*C)*vdot(1));
Best wishes
Torsten.

サインインしてコメントする。

回答 (1 件)

Birdman
Birdman 2018 年 5 月 7 日
Use Symbolic approach:
R=1000;L=0.8;C=1e-3;
syms v(t)
eq=diff(v,2)+(1/(R*C))*diff(v)+v/(L*C)==0;
cond1=v(0)==10;
Dv=diff(v);
cond2=Dv(0)==0;
V(t)=dsolve(eq,[cond1 cond2])
t=0:0.01:8;
plot(t,V(t))

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by