How do I fit a curve to the peaks of the data?
조회 수: 16 (최근 30일)
이전 댓글 표시
I have tha above data and I need to fit a curve based on the peaks to get something like as shown below
댓글 수: 0
답변 (2개)
Aditya Srikar
2023년 3월 31일
Hi Rukundo Wellen
Curve Fitting Toolbox contains functions for fitting curves and surfaces to data.
You can fit the curve to the peaks of data by using fit() function.
Based on characteristics of data, you can use library models like gaussian, fourier, polynomial, sin etc to obtain more precise curves.
You can refer the documentation for implementation details
Hope it helps.
댓글 수: 0
Star Strider
2023년 3월 31일
The approach depends on the result you want from the curve.
If you want parameters, then findpeaks or islocalmax will be necessary to define the peaks, then use polyfit and polyval to fit them and return the fitted curve and the appropriate parameters.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Curve Fitting Toolbox에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!