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

Manipulate (from Wolfram Demonstrations)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76774] Manipulate (from Wolfram Demonstrations)
  • From: Bruce Colletti <vze269bv at verizon.net>
  • Date: Sun, 27 May 2007 04:53:37 -0400 (EDT)

Re Mathematica 6.0 under WinXP.

The code below (from Wolfram Demonstrations site) plots a tangent at the point set by the slider.  

Point[{xi,p}] baffles me:  Point requires two numbers, but p is a function...I don't see how it evaluates to a number AT THIS location in the Manipulate statement.  

What is the mechanism that makes p evaluate to a number?  Is it somehow referring to Plot's {x,-2,2} ?

Thankx.

Bruce

Manipulate[
 With[{p = a x^3 + b x^2 + c x, dx = .8}, 
  With[{pp = D[p, x]}, 
   Plot[p, {x, -2, 2}, Ticks -> None, PlotRange -> All, 
    Epilog -> ({Orange, PointSize[.02], Point[{xi, p}], 
        Thickness[.005], 
        Line[{{xi - dx, p - dx pp}, {xi + dx, p + dx pp}}]} /. 
       x -> xi)]]], {{xi, 0, Subscript[x, 0]}, -2, 
  2}, Delimiter, {{a, -2, "a"}, -2, 2}, {{b, -2, "b"}, -2, 
  2}, {{c, -2, "c"}, -2, 2}, ControllerLinking -> True]


  • Prev by Date: Re: wrong limit ? (2)
  • Next by Date: Re: How to subtract two sets of data for a ListPlot
  • Previous by thread: Re: wrong limit ? (2)
  • Next by thread: Re: Manipulate (from Wolfram Demonstrations)