Anyway to "vectorize" the coding of symbolic ODE systems?

1 Ansicht (letzte 30 Tage)
Sree
Sree am 24 Nov. 2018
Bearbeitet: madhan ravi am 24 Nov. 2018
In other words, can the attached code be condensed using For loops and succint notation for c1(t), c2(t) etc.? I know how to generate subscripted symbolic variables, but am stumped with subscripted symfuns, especially in the context of the common dependent variable, here t.
  2 Kommentare
madhan ravi
madhan ravi am 24 Nov. 2018
+1 for organised code
Sree
Sree am 24 Nov. 2018
Thanks, but condensing the code would enable generalizing it to more than 5 species. A For Loop with n, instead of 5 . . . .

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

madhan ravi
madhan ravi am 24 Nov. 2018
Bearbeitet: madhan ravi am 24 Nov. 2018
Your code looks perfect(well organised and neat symbolic forms) , please don't think of changing it.

Weitere Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by