Azzera filtri
Azzera filtri

Matlab curve fitting toolbox acting weird

2 visualizzazioni (ultimi 30 giorni)
Haneya Qureshi
Haneya Qureshi il 3 Ott 2019
Commentato: Haneya Qureshi il 4 Ott 2019
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 Commenti
Haneya Qureshi
Haneya Qureshi il 4 Ott 2019
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 il 4 Ott 2019
Very valuable insights given by you! Much appreciated!

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Get Started with Curve Fitting Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by