Understanding how is working span - matlab loess smoothing

2 views (last 30 days)
I need to smooth time series with loess method. In matlab I need to define span which is a percentage of the total number of data points, less than or equal to 1 (it is defined like that for loess method https://www.mathworks.com/help/curvefit/smooth.html ).
Does anyone know how matlab in this case will find number of data points necessary for loess smoothing when I write to it percentage of total data points? Because that number of of data points necessary for loess smoothing need to be integer.
I tried with span 0.01 (1% of the total number of data points), in my case there are 144 data points, for 0.01 there are 0.01*144=1.44 data points for smoothing method, for 0.02 there are 0.02*144=2.88 data points for smoothing method. After smoothing with loess method and span 0.01 and 0.02 I got totally same results. I thought matlab is rounding number of data point for smoothing according to percentage, but it is not the case. I can`t understand how matlab finds number of data points for smoothing according to given percentage?

Answers (0)

Community Treasure Hunt

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

Start Hunting!