How can run ODE for different time span?

10 ビュー (過去 30 日間)
Padmapritha T
Padmapritha T 2020 年 11 月 9 日
コメント済み: Debasish Samal 2020 年 11 月 12 日
Thanks in Advance,
I need to run set of ODE equations, with different time sapn,
like for first time for loop is running the time span is [0 0.15]
and the second time the time span is [0.15 0.45] different.
Kindly suggest some solutions, Thank you.
n = 24 Hours.
ns = n*12.5-2 %%%dividing the 24 hours to 298 samples
t = linspace(0,n,ns);
for tt = 2:length(t)
tInt = t(tt-1);
tFin = t(tt);
tsim = [tInt tFin];
%%%%%ODE functions are here...
end
I need to change the tsim for evey time, with different time span.
  1 件のコメント
Debasish Samal
Debasish Samal 2020 年 11 月 12 日
Hello,
Can you please refer to the following MATLAB answer and verify if the same workflow works for you?
Thanks.
-Debasish

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by