Least squares fit line(s)
Syntax
lsline h = lsline
Description
lsline superimposes the least squares line on each line object in the current axes (except LineStyles '-','--','.-').
lsline
LineStyles
'-'
'.-'
h = lsline returns the handles to the line objects.
h = lsline
Example
y = [2 3.4 5.6 8 11 12.3 13.8 16 18.8 19.9]'; plot(y,'+'); lsline;
See Also polyfit, polyval
polyfit
polyval