How to define simultaneous equations for ODE45

1 回表示 (過去 30 日間)
alpedhuez
alpedhuez 2020 年 5 月 30 日
コメント済み: alpedhuez 2020 年 5 月 30 日
Suppose I have equations
I understand I write
f=@(t,x,a)[x(1)+x(2),x(1)-a*x(2)]
But I hope to define equations one by one f1 and f2 and then combine into f. Please advise.

採用された回答

madhan ravi
madhan ravi 2020 年 5 月 30 日
f1 = @(t,x) x(1) + x(2)
f2 = @(t,x,a) x(1)-a*x(2)
F = @(t,x,a) [f1(t,x);f2(t,x,a)]
  1 件のコメント
alpedhuez
alpedhuez 2020 年 5 月 30 日
Thank you. Let me work on it.

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by