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!
somey=(ylist/.ysol)[[1]][1,1,1,0]
gives youInterpolatingFunction[stuff][t]
so that looks like it has extracted your first function and inserted your parameters. Thensomey/.t->2
looks like it gives you the value of your function att==2
and it looks like your first function is zero whent==2
with those parameters. ThenTable[somey,{t,0,10}]
gives you{0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}
ThenPlot[somey+0.1,{t,0,10}]
plots your function with a fudge factor added to get it off the x axis, so it looks like your function is zero everywhere. Are you SURE the solution is nonzero $\endgroup$