How to find minimum and maximum of a fitted curve.??
조회 수: 22 (최근 30일)
이전 댓글 표시
I have fitter my time series using fourier option of fit command, I want to know how to find the minimum and maximum of the fitted curve
댓글 수: 2
채택된 답변
Matt J
2014년 9월 29일
편집: Matt J
2014년 9월 29일
My approach would be to,
- Sample the curve finely (much higher sampling rate than the frequency of the fitted curve) and get approximate locations of the global max and min from the samples using the commands min() and max()
- Refine the approximation from Step 1 using fzero. That is, use fzero to find where the derivative of the fitted curve is zero, using the points from Step 1 as the intial guesses.
댓글 수: 3
Matt J
2014년 9월 30일
편집: Matt J
2014년 9월 30일
That's what my 2-step Answer told you how to do. Use feval in Step 1, or the other methods mentioned here,
to evaluate the curve at many points. When you have a vector of samples of hte curve, you can apply max() or min() to find approximate locations of the max and min. Then, in Step 2, you can refine with fzero, if you wish.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!