Is the 8th term maximum in the curve fitting toolbox and command line?

조회 수: 1 (최근 30일)
재열 김
재열 김 2022년 5월 23일
편집: Matt J 2022년 5월 23일
It seems to apply up to 9th term with a simple command line input.
From 'sin10', it is recognized as 3D. is there any other way?
I hope for your answer. thank you.
F = fix(x,y,'sin9')
plot(F,x,y)

답변 (2개)

Matt J
Matt J 2022년 5월 23일
You will probably have to use a custom model, or else resort to lsqcurvefit().
  댓글 수: 4
재열 김
재열 김 2022년 5월 23일
Thank you for answer. I'd like to get a startpoint that is optimized equal to the sum of sine model.
However, the startpoint for a custom nonlinear model is arbitrary.
Of course I can input the coefficients directly, but I can't find the appropriate coefficient values.
So I want to know how to get an optimized startpoint.
thanks!
Matt J
Matt J 2022년 5월 23일
편집: Matt J 2022년 5월 23일
For a startpoint, perhaps do a non-custom 'sin8' fit to estimate the first 24 parameters. Subtract the sin8 fit from the measured curve samples to obtain a a modified set of curve samples to which you would do a non-custom 'sin2' fit to estimate the remaining parameters.
F=fit(x,y,'sin8');
dy=y-F(x);
dF=fit(x,dy,'sin2');
startpoint=[coeffvalues(F),coeffvalues(dF)]; %startpoint for custom sin10 fit

댓글을 달려면 로그인하십시오.


Matt J
Matt J 2022년 5월 23일
Perhaps just do an FFT decomposition and select the 10 strongest frequencies.

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by