smoothing a graph using matlab
3 次查看(过去 30 天)
显示 更早的评论
how can I smooth data imported from one column (Excel sheet) using Matlab , Thanks
how to smooth the corners?![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1013755/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1013755/image.png)
0 个评论
采纳的回答
Star Strider
2022-5-28
y = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1013745/Book1.xlsx');
L = numel(y);
x = linspace(0, L-1, L);
figure
plot(x, y)
grid
yf = smoothdata(y, 'sgolay', fix(L/25));
figure
plot(x, yf)
grid
Experiment with the window size (third argument in smoothdata) to get the result you want.
.
0 个评论
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!