Basically, I wanted to vary a parameter in my differential equations, while using NDsolve (ParametricNDsolve wasn't working for some reason, but that's for another question). I'm stuck looking for the correct command for the last part in the following code section (Very sorry for the crappy formatting).
For[e = 0, e < 6, e++, {Sol = NDSolve[{H[t] == -e*g[t], g[0] == g[2*Pi],
g[Pi] == 1}, g[t], {t, 0, 2*Pi}]};
<Command to insert g[t]/.Sol in a Table>]
My intention is to then plot all the solutions hence stored in the Table, using another loop, in a single graph. If this can be done directly, please provide some hints how.
Sol ={}; For[.e ==0, .., AppendTo[Sol,NDSolve[....]]
? $\endgroup$ParametricNDSolve
. That will make your life much easier. Also: forgetFor
exists in Mathematica. UseTable
orDo
instead. $\endgroup$