How do convert the following set of time dependent differential equations into a set of discrete equations? Please provide code.
2 ビュー (過去 30 日間)
古いコメントを表示
回答 (1 件)
Pravin Jagtap
2020 年 2 月 6 日
Hello Varun,
I am assuming the constant time step 'dt'. Please refer following snipet to get an idea and write the code
x(k+1) = x(k) + dt* f(x,y,z); % same for y(k+1) and z(k+1)
Itereate this over number of time steps you want. You can update 'x', 'y' and 'z' variables in the same for loop.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!