lsline
添加最小二乘直线scatter plot
Syntax
lsline
lsline(ax)
h = lsline(___)
Description
lsline
superimposes a least-squares line on each scatter plot in the current axes. Scatter plots are produced by the MATLAB®scatter
andplot
functions. Data points connected with solid, dashed, or dash-dot lines (“- - -”
,'--'
, or'.-'
) are not considered to be scatter plots bylsline
, and are ignored.
lsline(ax)
superimposes a least-squares line on the scatter plot in axisax
.
h = lsline(___)
returns a column vector of handlesh
to the least-squares lines, using any of the previous syntaxes.
Examples
Introduced before R2006a
Was this topic helpful?