Note: This page has been translated by MathWorks. Click here to see

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

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

Detect and remove outliers in data

`B = rmoutliers(A)`

`B = rmoutliers(A,method)`

`B = rmoutliers(A,movmethod,window)`

`B = rmoutliers(___,dim)`

`B = rmoutliers(___,Name,Value)`

```
[B,TF] =
rmoutliers(___)
```

detects and removes outliers from the data in a vector, matrix, table, or timetable. `B`

= rmoutliers(`A`

)

If

`A`

is a row or column vector,`rmoutliers`

detects outliers and removes them.If

`A`

is a matrix, table, or timetable,`rmoutliers`

detects outliers in each column or variable of`A`

separately and removes the entire row.

By default, an outlier is a value that is more than three scaled median absolute deviations (MAD) away from the median.

specifies additional parameters for detecting and removing outliers using one or more
name-value pair arguments. For example, `B`

= rmoutliers(___,`Name,Value`

)`rmoutliers(A,'SamplePoints',t)`

detects outliers in `A`

relative to the corresponding elements of a time
vector `t`

.

`fillmissing`

| `filloutliers`

| `ismissing`

| `isoutlier`

| `rmmissing`