MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: About printing a Notebook
  • Next by Date: Re: New in 5.1.1?
  • Previous by thread: Re: Yukawa
  • Next by thread: Re: Yukawa