My question is this: I don't understand how the construct solc[] works. It appears to be working as an array
yet it is using functional syntax. The code works. Can anybody explain this?
Thanks in advance.
p1 = VectorPlot[{u, 3 v}, {u, -3, 3}, {v, -3, 3}] ;
odec[u0_, v0_] :=
NDSolve[{u'[t] == u[t], v'[t] == 3 v[t], u[0] == u0,
v[0] == v0}, {u[t], v[t]}, {t, -3, 3}];
solc[1] = odec[1, 1]; solc[2] = odec[1, -1]; solc[3] = odec[-1, -1];
solc[4] = odec[-1, 1]; solc[5] = odec[3, 1]; solc[6] = odec[1, 3];
solc[7] = odec[-1, -3]; solc[8] = odec[-3, -1];
p2 = ParametricPlot[
Evaluate[Table[{u[t], v[t]} /. solc[i], {i, 8}]], {t, -3, 3},
PlotRange -> {{-3, 3}, {-3, 3}}, PlotPoints -> 100,
AxesLabel -> {"u", "y"}];
Show[{p1, p2}, PlotRange -> {{-3, 3}, {-3, 3}},
AxesLabel -> {"x", "y"}, Axes -> True]