Is the 8th term maximum in the curve fitting toolbox and command line?
1 次查看(过去 30 天)
显示 更早的评论
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)
0 个评论
回答(2 个)
Matt J
2022-5-23
You will probably have to use a custom model, or else resort to lsqcurvefit().
4 个评论
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
2022-5-23
Perhaps just do an FFT decomposition and select the 10 strongest frequencies.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!