0
$\begingroup$

When I was solving my ODE system with NDSolve, I obtain

{x[t]->InterpolationFunction[{{1., 126.}},<>][t],y[t]->InterpolationFunction[{{1., 126.}},<>][t]}

How can show a list point?

In particular, I need to know the cordinates of the last point in x[t] and y[t]

Help me, please

$\endgroup$
4
  • 1
    $\begingroup$ (x[x[t]] /. sol /. t -> "Domain")[[1, 2]] and (y[x[t]] /. sol /. t -> "Domain")[[1, 2]]. (First look at x[t] /. sol /. t -> "Domain", which should give you the domain {{1., 126.}} shown above. Then (x[x[t]] /. sol /. t -> "Domain") gives the x and y values on the first and last points of the domain. Then ...[[1, 2]] extracts the last point. $\endgroup$
    – Michael E2
    May 20 at 0:35
  • $\begingroup$ Related: mathematica.stackexchange.com/questions/48743/…, $\endgroup$
    – Michael E2
    May 20 at 0:36
  • 1
    $\begingroup$ Also Last /@ ({x[t], y[t]} /. sol /. t -> "ValuesOnGrid") should work. I'd use a different NDSolve call: {sol} = NDSolve[ode, {x, y}, {t,...}]. $\endgroup$
    – Michael E2
    May 20 at 0:46
  • $\begingroup$ Thanks a lot Michael E2, it works! $\endgroup$ May 20 at 1:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.