フィルターのクリア

Matlab ODE Solvers - Paramater Question

1 回表示 (過去 30 日間)
Joe
Joe 2024 年 5 月 17 日
コメント済み: Torsten 2024 年 5 月 17 日
Greetings,
I working with a system of differential equations that model amount of components as a reaction proceeds. I want to pass a variable parameter through one of matlab's ode solvers (probably 45/15). This is in addition to time bounds, so it would be like ode45(function, times, [X1(0),X2(0),...X5(0)],... ). I want to find λ given something like X1(final) = 0.35. How to include this information?
Thank you (:

回答 (2 件)

Walter Roberson
Walter Roberson 2024 年 5 月 17 日
However... for the task of finding X1(final) = 0.35 you should be using one of the Boundary Value Problems solvers; https://www.mathworks.com/help/matlab/boundary-value-problems.html
  1 件のコメント
Joe
Joe 2024 年 5 月 17 日
編集済み: Joe 2024 年 5 月 17 日
--Thank you!

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


Torsten
Torsten 2024 年 5 月 17 日
移動済み: Torsten 2024 年 5 月 17 日
You mean
ode45(@(t,y)fun(t,y,lambda),times,[X1(0),X2(0),...X5(0)])
function res = fun(t,y,lambda)
...
end
? But what do you mean by "variable parameter" ? This is a contradiction in itself: A parameter isn't variable.
  2 件のコメント
Joe
Joe 2024 年 5 月 17 日
Thanks! How I include the extra final condition? Would that go in ode45 line?
Torsten
Torsten 2024 年 5 月 17 日
If you have a final condition for one of the unknown functions, you should use "bvp4c" instead of "ode45".

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

カテゴリ

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by