I have some 9000 points that are plotted on a graph:
我在圖上畫了9000點
(完整的決議)
Actually, the plot is not as smooth as I wanted it to be. Is there some way I can smoothen the graph to a required degree?
實際上,情節並不像我想象的那么順利。有沒有什么方法可以讓圖形達到要求的程度?
Or some form of thresholding so that I can selectively smoothen out the parts that is too bumpy?
或者某種形式的閾值,這樣我可以有選擇地撫平那些太顛簸的部分?
I am not sure but can fast-fourier-transform help?
我不確定,但是快速傅里葉變換能有幫助嗎?
5 个解决方案
#1
17
A simple (ad hoc) way is to just take a weighted average (tunable by alpha) at each point with its neighbors:
一個簡單(特別)的方法是,在每個點與它的左鄰右取一個加權平均(可調):
data(2:n-1) = alpha*data(2:n-1) + (1-alpha)*0.5*(da