Add reference line to plot

`refline(m,b)`

refline(coeffs)

refline

refline(ax,___)

hline = refline(___)

`refline(m,b)`

adds a reference
line with slope `m`

and intercept `b`

to
the current axes.

`refline(coeffs)`

, where `coeffs`

is
a two-element coefficient vector, adds the line

y = coeffs(1)*x + coeffs(2)

to the figure.

`refline`

with no input arguments is equivalent
to `lsline`

.

`refline(ax,___)`

adds a reference
line to the plot in the axis specified by `ax`

, using
any of the previous syntaxes.

`hline = refline(___)`

returns
the handle `hline`

to the line.

Was this topic helpful?