How can I use syms in a loop to create user-defined number of ODEs?

2 ビュー (過去 30 日間)
Joson Mathew
Joson Mathew 2021 年 4 月 27 日
回答済み: Joson Mathew 2021 年 4 月 27 日
L=zeros(1,n);
for i=1:n
syms (L(i))(t)
end
This looks like what I'm trying to do, obviously it doesn't work but I'm trying to create a system with a variable no of ODEs and store them all in this array. How can I achieve this?

回答 (1 件)

Joson Mathew
Joson Mathew 2021 年 4 月 27 日
I think I solved it with this:
syms L(t) [1 n];

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by