![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/614080/image.png)
smoothing a curve efficiently
39 次查看(过去 30 天)
显示 更早的评论
Hi , I need to make my curve smooth and I use all of the method simoltaneouly but my data need to be more smooth. how can I make this happen ?
very thanks in advance ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/613805/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/613805/image.jpeg)
0 个评论
采纳的回答
DGM
2021-5-11
Since you haven't said what you actually attempted and haven't given any sample data or even revealed the domain and range of the plot image, I can only offer a simple example.
% make up some function with a similar appearance
x = linspace(0,10,100);
y = -0.01*(x-6).^2 + 0.05*abs(sin(4*x));
% smooth the thing with an averaging filter
ys = smooth(y,20);
% smooth the thing with a spline fit (uses CFT)
fm = fit(x',y','smoothingspline','smoothingparam',0.9);
plot(x,y,'k:'); hold on; grid on
plot(x,ys,'r')
plot(x,fm(x),'b')
legend('original','average','spline','location','southeast')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/614080/image.png)
You'd obviously have to tailor the parameters to whatever data you're actually using.
更多回答(1 个)
Das Siddharth
2021-5-10
Did you try the smooth (MAF) function from the MATLAB ? Try that with smoothing a specific coloumn or row and see what gives you the best result. Hope it helps.
3 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!