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.

Resample uniform or nonuniform data to new fixed rate

`y = resample(x,p,q)`

`y = resample(x,p,q,n)`

`y = resample(x,p,q,n,beta)`

`y = resample(x,p,q,b)`

`[y,b] = resample(x,p,q,___)`

`y = resample(x,tx)`

`y = resample(x,tx,fs)`

`y = resample(x,tx,fs,p,q)`

`y = resample(x,tx,___,method)`

```
[y,ty] =
resample(x,tx,___)
```

```
[y,ty,b]
= resample(x,tx,___)
```

interpolates the input signal to an intermediate uniform grid with a sample spacing
of (`y`

= resample(`x`

,`tx`

,`fs`

,`p`

,`q`

)`p`

/`q`

)/`fs`

. The
function then filters the result to upsample it by `p`

and
downsample it by `q`

, resulting in a final sample rate of
`fs`

. For best results, ensure that
`fs`

× `q`

/`p`

is at least twice as large as the highest frequency component of
`x`

.

`resample`

performs an FIR design using `firls`

, normalizes the result to account
for the processing gain of the window, and then implements a rate
change using `upfirdn`

.

`decimate`

| `downsample`

| `firls`

| `interp`

| `interp1`

| `intfilt`

| `kaiser`

| `spline`

| `upfirdn`

| `upsample`