Matlab curve fitting toolbox acting weird

2 次查看(过去 30 天)
I am entering v as x variable and G as y variable in matlab toolbox and fitting it using sum of sines, no. of terms =2
v=-90:90;
B=65;
G=(v./B).^2;
I am getting output shown below. This shows a great fit. But when I write the equation using coefficients given by matlab myself, the graph I get is not the same!!!
fitresult(x) = a1*sin(b1*x+c1) + a2*sin(b2*x+c2)
Coefficients (with 95% confidence bounds):
a1 = 504.9 (-6.058e+08, 6.058e+08)
b1 = 0.01277 (-26.03, 26.06)
c1 = 1.571 (1.525, 1.617)
a2 = 505 (-6.058e+08, 6.058e+08)
b2 = 0.01281 (-25.95, 25.98)
c2 = -1.571 (-1.617, -1.525)
  4 个评论
Haneya Qureshi
Haneya Qureshi 2019-10-4
Problem got resolved! Thank you so much! It was the number of decimal places!!! I was taking rounded off values by copy pasting directly from the curve fitting toolbox. Thanks a lot!
Haneya Qureshi
Haneya Qureshi 2019-10-4
Very valuable insights given by you! Much appreciated!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile 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!

Translated by