Re: Yukawa
- To: mathgroup at smc.vnet.net
- Subject: [mg54829] Re: Yukawa
- From: Peter Pein <petsie at arcor.de>
- Date: Wed, 2 Mar 2005 22:29:17 -0500 (EST)
- References: <d03o8d$8ab$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
dumb_founded wrote: > I was using Mathematica to solve simultaneously the x and y equations > of motion for a particle subjected to a Yukawa potential. NDSolve > predictably gave an interpolating function. However, when I tried to > plot this function, I got the error message that it is not real valued > at certain pairs of points. What is going on? Can I do anything to > remedy the situation? > > > Thanks. > Try {solx,soly}={x,y}/.First[NDSolve[...,{x,y},t]]; numx[t_?NumericQ]:=solx[t]; numy[t_?NumericQ]:=soly[t]; ^^^^^^^^^ ^^^^^^^^^ ParametricPlot[{numx[t],numy[t]},{t,t0,t1}] -- Peter Pein Berlin