smoothing a graph using matlab
2 views (last 30 days)
Star Strider on 28 May 2022
y = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1013745/Book1.xlsx');
L = numel(y);
x = linspace(0, L-1, L);
yf = smoothdata(y, 'sgolay', fix(L/25));
Experiment with the window size (third argument in smoothdata) to get the result you want.