Smoothing 1D not equidistant curve by convolution

バージョン 1.1 (1.73 MB) 作成者: Peter Seibold
The filtering is done with a triangle filter by convolution of the resampled non equidistant curve. Also with automatic filter generation.
ダウンロード: 23
更新 2024/7/11

ライセンスの表示

Smoothing 1D not equidistant curve by convolution
The filtering is done with a triangle filter by convolution of the resampled non equidistant curve. Also with automatic generation of suitable filter width.
In order to get a full curve filtering, the curve is linear extrapolated on both sides and not zero padded.
1 Manual
Invoke the function with: [ys,wout*,xse*,yse*]=smooth1DconvNE(xy,w*)
*) optional arguments
Valid is also e.g.: ys =smooth1DconvNE(xy)
1.1 Input:
The first argument xy is the curve to be smoothed.
The first column contains the x-values and the second column contains the corresponding y-values. The input xy may be also crated as two rows. The minimum are 3 sample pairs.
The 2nd argument, called w (width of filter), is optional.
w is a scalar floating number in x-units. 0 w < 0.9 * length of curve.
For w=0 no filtering, but a resampled curve xse, yse is returned.
Two modes are possible:
1.) w omitted: Filter width is determined by FFT.
2.) w is set as a floating number in x-units and used as filter.
1.2 Output:
ys: smoothed y as vertical vector. The x-values remain unchanged. Vertical vector.
wout: filter width used
xse: resampled equidistant x-values of the smoothed curve. Vertical vector.
yse: resampled equidistant y-values of the smoothed curve. Vertical vector.
In case of a bad input, all outputs are set to zero.
1.3 Remark:
The border values of the smoothed output ys are approximations. In order to calculate those values, the input y is extended by extrapolation of the smoothed input. The approximated border output is one half of the filter width.

引用

Peter Seibold (2024). Smoothing 1D not equidistant curve by convolution (https://www.mathworks.com/matlabcentral/fileexchange/132528-smoothing-1d-not-equidistant-curve-by-convolution), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2016a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.1

Identical x values are removed during process and added later on in the result.

1.0.0