How to use harmonic fitting method
조회 수: 30 (최근 30일)
이전 댓글 표시
Hi,
Please, how can I use Harmonic fiting for the attached data to get a smooth fit.
댓글 수: 5
채택된 답변
Sam Chak
2023년 9월 20일
I'm interpreting your 'Harmonic' model as the 'Sum of Sine' model. If this is not the case, then you will need to create a custom nonlinear model that suits the name "Harmonic" using the fittype() function.
y = load('darta1.txt');
x = linspace(10, 60, numel(y));
[f, gof] = fit(x', y, 'sin3')
plot(f, x, y), grid on,
legend('data', 'Sum of Sine (type-3)', 'location', 'best')
추가 답변 (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!