I want to plot solution of differential equation which behaves differently at different time interval.
For eg, dh/dt=h^2-f(t)*h Where f(t)=t for [0,3] and f(t)=1 for [3,10].
h(0)=15
How can I plot the solution of differential equation in same plot from [0,10]

回答 (1 件)

Star Strider
Star Strider 2018 年 2 月 23 日

0 投票

You need to integrate it on [0 3] with ‘f(t)=t’ and ‘h(0)=15’, then integrate it on [3 10] with ‘f(t)=1’, and ‘h(0)=h(3)’ from the previous integration.
The ODE numerical integration functions do not handle integrating across significant discontinuities, so separate integrations over the two time intervals are required.

カテゴリ

ヘルプ センター および File Exchange で Numerical Integration and Differential Equations についてさらに検索

質問済み:

2018 年 2 月 23 日

回答済み:

2018 年 2 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by