MATLAB: What is the default window size when you use the ‘movmedian’ or ‘movavg’ method in the smoothdata function

errorsnoisesmoothdata

I was trying to use the inbuilt function smoothdata to try and reduce the noise in my set of data and was wondering what the default window size would be selected when we use the 'movmedian' or 'movavg' method.

Best Answer

There isn't one. When you specify that method yourself then you must pass in the window size. If you do not specify the method or window size then it uses an algorithm to decide the window size. The document says:
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