Secant and Curve

Comments

1 comment

  • Support Admin

    You can draw the curve on the xyPlot by calculating the values of the curve over a range, and adding each value to your series. For example:

    <script> 
    for x = -5, 5, 0.1 do
    y = -0.25*(x+2)*(x+1)*(x-1)*(x-3)
    myPlot.curve:Add(x,y)
    end
    </script>

    <xyPlot name="myPlot">
    <axis dim="x" auto="fixed" min="-5" max="5" />
    <series name="curve" />
    <series name="secLine" capacity="2" />
    </xyPlot>

    This plots the example function over the range of -5 to 5.

    You can then draw the secant line by adding two points along the curve to a different series. 

     

    0
    Comment actions Permalink

Please sign in to leave a comment.