Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Projectile motion

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80167] Re: Projectile motion
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Tue, 14 Aug 2007 06:59:47 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <f9p4l0$qhl$1@smc.vnet.net>

Mike wrote:
> One more question. If animate the program, ymax at the end turns out to be some number on the order of 10^-9. I tried using Chop to round it to zero, but it doesn't work. Any ideas?

The function *Chop* accepts a second argument: "Chop[expr,delta] 
replaces numbers smaller in absolute magnitude than delta by 0."
(The default for delta is 10^-10.) So,

In[1]:=
data = Table[N[10]^(-n), {n, 12}];
Chop /@ data
(Chop[#1, 10^(-6)] & ) /@ data

Out[2]=
{0.1, 0.01, 0.001, 0.0001, 0.00001, 1.*^-6, 1.*^-7, 1.*^-8,
1.*^-9, 1.*^-10, 0, 0}

Out[3]=
{0.1, 0.01, 0.001, 0.0001, 0.00001, 1.*^-6, 0, 0, 0, 0, 0, 0}

-- 
Jean-Marc


  • Prev by Date: Re: Problems naming files with equation names
  • Next by Date: Re: Reproducible kernel crash
  • Previous by thread: Re: Projectile motion
  • Next by thread: How show Locator point and its image under a function?