TransWikia.com

ParametricNDSolve is not returning results when I use list of functions

Mathematica Asked by khvillegas on August 30, 2020

I am solving DE w/ parameters. It has many functions so I tried to automate using list but it is not working. Specifically, it does not give specific value even when all parameters are specified and the plot is empty. Here is a minimal example:

ylist = {y1[t], y2[t]};(*create list of functions to solve*)
m = {{a, b}, {c, d}};(*parameters arranged as matrix*)
ysol = ParametricNDSolve[Flatten[{Table[D[ylist[[i]], t] ==(m.ylist) 
[[i]], {i, 1, 2}],Table[(ylist[[j]] /. t -> 0) == 0, {j, 1, 2}]}],
ylist, {t, 0, 10}, {a, b, c, d}];

I expect the following to give a number but it does not:

ylist[1, 1, 1, 0][1] /. ysol

Consenquently, the plot is empty:

Plot[Re[Evaluate[ylist[1, 1, 1, 0][t] /. ysol]], {t, 0, 10}]

Any help much appreciated!

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP