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.

Smooth noisy data

`B = smoothdata(A)`

`B = smoothdata(A,dim)`

`B = smoothdata(___,method)`

`B = smoothdata(___,method,window)`

`B = smoothdata(___,nanflag)`

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

```
[B,window]
= smoothdata(___)
```

returns
a moving average of the elements of a vector using a fixed window
length that is determined heuristically. The window slides down the
length of the vector, computing an average over the elements within
each window.`B`

= smoothdata(`A`

)

If

`A`

is a matrix, then`smoothdata`

computes the moving average down each column.If

`A`

is a multidimensional array, then`smoothdata`

operates along the first dimension whose size does not equal 1.If

`A`

is a table or timetable with numeric variables, then`smoothdata`

operates on each variable separately.

specifies
additional parameters for smoothing using one or more name-value pair
arguments. For example, if `B`

= smoothdata(___,`Name,Value`

)`t`

is a vector of time
values, then `smoothdata(A,'SamplePoints',t)`

smooths
the data in `A`

relative to the times in `t`

.

When the window size for the smoothing method is not specified, `smoothdata`

computes
a default window size based on a heuristic. For a smoothing factor τ,
the heuristic estimates a moving average window size that attenuates
approximately 100*τ percent of the energy of the input data.

`fillmissing`

| `filter`

| `movmad`

| `movmean`

| `movmedian`

Was this topic helpful?