Statistics Toolbox    
refline

Add a reference line to the current axes

Syntax

Description

refline(slope,intercept) adds a reference line with the given slope and intercept to the current axes.

refline(slope), where slope is a two-element vector, adds the line

to the figure.

h = refline(slope,intercept) returns the handle to the line.

refline with no input arguments superimposes the least squares line on each line object in the current figure (except LineStyles '-','--','.-'). This behavior is equivalent to lsline.

Example

See Also
lsline, polyfit, polyval, refcurve


  refcurve regress