how to optimize a function which is no smooth but has rough minimum point
이전 댓글 표시
Dear fellows,
I have a function which is not smooth. But there is a global minimum roughly. The following photos show the shape of the function. The first is over the range [0,1] and the second is over the range [0.6 0.9]. I know that the optimal value is supposed to be around 0.8. How could I find the optima which is 0.8?


채택된 답변
추가 답변 (2개)
Alan Weiss
2014년 5월 14일
0 개 추천
You could try smoothing your function before minimizing. Take a convolution with a smooth function with width around 1/4 or 1/2. Even simpler, take g(x) = int(f(t),x-0.5,x+0.5) or some such average.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Image Analyst
2014년 5월 15일
0 개 추천
Another option is to use a Savitzky Golay filter, sgolayfilt() in the Signal Processing Toolbox. Basically it's a window that slides along and sets the center of the window equal to the value of a polynomial you fit to the data within the window. It should probably smooth that out pretty nicely. You forgot to attach your data file so I couldn't do a demo for you with your data, but it's a pretty easy one liner.
카테고리
도움말 센터 및 File Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
