# smooth

Smooth response data

## Syntax

## Description

smooths
the response data in column vector `yy`

= smooth(`y`

)`y`

using a moving average
filter.

The first few elements of `yy`

follow.

yy(1) = y(1) yy(2) = (y(1) + y(2) + y(3))/3 yy(3) = (y(1) + y(2) + y(3) + y(4) + y(5))/5 yy(4) = (y(2) + y(3) + y(4) + y(5) + y(6))/5 ...

`smooth`

handles endpoints, the result differs from the result
returned by the `filter`

function.

performs the operation on a GPU using `gpuarrayYY`

= smooth(`gpuarrayY`

,___)`gpuArray`

data. You can use
`gpuArray`

response data with all previous syntaxes. This syntax
requires Parallel Computing Toolbox™.

performs the operation on a GPU using `gpuarrayYY`

= smooth(`gpuarrayX`

,`gpuarrayY`

,___)`gpuArray`

input data. This syntax
requires Parallel Computing Toolbox.

**Note**

Using `gpuArray`

`x`

and `y`

inputs with the `smooth`

function is only recommended if you use the default method, `'moving'`

.
Using GPU data with other methods does not offer any performance advantage.

## Examples

## Input Arguments

## Output Arguments

## Tips

For more options for smoothing data, including the moving median and Gaussian methods, see

`smoothdata`

.You can generate a smooth fit to your data using a smoothing spline. For more information, see

`fit`

.

## Extended Capabilities

## Version History

**Introduced before R2006a**