You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
averagesmooth.m accepts a row vector set(s) of data and how many neighbors (in one direction) you want to average each data point over. It returns the smoothed data set(s).
Inputs:
data -- any linear data set (it can have multiple sets, i.e. 2161x6 will smooth 6 sets of 2161 points)
smoothwidth -- is a natural number, with 0 meaning no smoothing, 1 meaning nearest neighbors are included in the average (3 pts), 2 meaning nearest and next-nearest are included (5 pts), etc..
averagesmooth.m pads the data set to repeat the endpoints. For example, with a smoothwidth of 3, the first point's value is:
(x1 + x1 + x1 + x1 + x2 +x3 +x4) / 7 i.e.: (3 points of padding using point 1 + point 1 + points 2, 3 and 4) / 7
Cite As
Jason Moscatello (2026). averagesmooth(data,smoothwidth) (https://in.mathworks.com/matlabcentral/fileexchange/63662-averagesmooth-data-smoothwidth), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.1.0.0 (3.13 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
