Statistics Toolbox    
refcurve

Add a polynomial curve to the current plot

Syntax

Description

refcurve adds a graph of the polynomial p to the current axes. The function for a polynomial of degree n is:

y = p1xn + p2x(n-1) + ... + pnx + pn+1

Note that p1 goes with the highest order term.

h = refcurve(p) returns the handle to the curve.

Example

Plot data for the height of a rocket against time, and add a reference curve showing the theoretical height (assuming no air friction). The initial velocity of the rocket is 100 m/sec.

See Also
polyfit, polyval, refline


  rcoplot refline