Moving smoothing filter for 1D data with floating point filter values .
(The build-in function 'smooth.m' from matlab operates only with odd integer nummbers.)
y is the vector to be smoothed.
n is the filter value with any number.
Filter values n below/equal 1 will return the original input.
Filter values larger than the number of elements in the y vector are reduced.
The filter is symmetric and has therefore an odd number of elements.
Also tested with Matlab R2013
Peter Seibold (2021). Moving smoothing filter for 1D data with floating point filter values (https://www.mathworks.com/matlabcentral/fileexchange/66099-moving-smoothing-filter-for-1d-data-with-floating-point-filter-values), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!