| Statistics Toolbox | Search  Help Desk |
| refcurve | Examples See Also |
Add a polynomial curve to the current plot.
Syntax
h = refcurve(p)
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.h = [85 162 230 289 339 381 413 437 452 458 456 440 400 356]; plot(h,'+') refcurve([-4.9 100 0])
![]()
See Also
polyfit,polyval,refline