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.

1-D median filtering

```
y =
medfilt1(x)
```

```
y =
medfilt1(x,n)
```

```
y =
medfilt1(x,n,blksz,dim)
```

`y = medfilt1(x,n,[],dim)`

`y = medfilt1(___,nanflag,padding)`

If you have a license for Image Processing
Toolbox™ software,
you can use the `medfilt2`

function
to perform two-dimensional median filtering.

[1] Pratt, William K. *Digital Image Processing*.
4th Ed. Hoboken, NJ: John Wiley & Sons, 2007.

`filter`

| `hampel`

| `median`

| `movmedian`

| `sgolayfilt`