Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

**Class: **LinearModel

Plot residuals of linear regression model

`plotResiduals(mdl)`

plotResiduals(mdl,plottype)

h = plotResiduals(___)

h = plotResiduals(mdl,plottype,Name,Value)

`plotResiduals(`

gives
a histogram plot of the residuals of the `mdl`

)`mdl`

linear
model.

`plotResiduals(`

plots
residuals in a plot of type `mdl`

,`plottype`

)`plottype`

.

returns
handles to the lines in the plot, using any of the previous syntaxes.`h`

= plotResiduals(___)

plots
with additional options specified by one or more `h`

= plotResiduals(`mdl`

,`plottype`

,`Name,Value`

)`Name,Value`

pair
arguments.

For many plots, the Data Cursor tool in the figure window displays the

*x*and*y*values for any data point, along with the observation name or number.

The `mdl.Residuals`

table contains the information
in residual plots.

Was this topic helpful?