Skip to main content
added second plot
Source Link
bbgodfrey
  • 62.1k
  • 18
  • 92
  • 160

If you are attempting to solve ODEs one through five in sequence, one way to do so is

GraphicsGrid[{Table[s = NDSolve[eqns[[n]], vars[[n]], {t, 0, 50T}];
    Plot[Evaluate[vars[[n]] /. s], {t, 0, 50T}, PlotRange -> All], {n, 5}]}, 
    ImageSize -> Large]

enter image description hereenter image description here

Alternatively, the solutions can be presented in a single plot.

Show @@ Table[s = NDSolve[eqns[[n]], vars[[n]], {t, 0, T}];
    Plot[Evaluate[vars[[n]] /. s], {t, 0, T}, PlotRange -> All], {n, 5}]

enter image description here

Not surprisingly, all curves for each value of n coincide.

If you are attempting to solve ODEs one through five in sequence, one way to do so is

GraphicsGrid[{Table[s = NDSolve[eqns[[n]], vars[[n]], {t, 0, 50}];
    Plot[Evaluate[vars[[n]] /. s], {t, 0, 50}, PlotRange -> All], {n, 5}]}, 
    ImageSize -> Large]

enter image description here

If you are attempting to solve ODEs one through five in sequence, one way to do so is

GraphicsGrid[{Table[s = NDSolve[eqns[[n]], vars[[n]], {t, 0, T}];
    Plot[Evaluate[vars[[n]] /. s], {t, 0, T}, PlotRange -> All], {n, 5}]}, 
    ImageSize -> Large]

enter image description here

Alternatively, the solutions can be presented in a single plot.

Show @@ Table[s = NDSolve[eqns[[n]], vars[[n]], {t, 0, T}];
    Plot[Evaluate[vars[[n]] /. s], {t, 0, T}, PlotRange -> All], {n, 5}]

enter image description here

Not surprisingly, all curves for each value of n coincide.

Source Link
bbgodfrey
  • 62.1k
  • 18
  • 92
  • 160

If you are attempting to solve ODEs one through five in sequence, one way to do so is

GraphicsGrid[{Table[s = NDSolve[eqns[[n]], vars[[n]], {t, 0, 50}];
    Plot[Evaluate[vars[[n]] /. s], {t, 0, 50}, PlotRange -> All], {n, 5}]}, 
    ImageSize -> Large]

enter image description here