Function for best fitting
Afficher commentaires plus anciens
I've got a set of data :Y(d). And I am trying to approximate this set for an polynomial function in the following form :
So the problem is to find the values of each constant : "a,b,c,e" , for the best fitting!
So does someone know an possible way to do it,maybe some function ?
Obs:The set of data is quite big , so by "multiple iterations" I don't think Matlab can process some rotine.
1 commentaire
Azzi Abdelmalek
le 21 Nov 2012
It does'nt look like a polynomial function
Réponse acceptée
Plus de réponses (2)
Use LSQCURVEFIT if you have it.
1 commentaire
Israel
le 22 Nov 2012
If noise is sufficiently negligble, you could also rewrite the problem as a linear fitting:
d=d(:);
Y=Y(:);
w=ones(length(d),1);
A=[w,d,-Y, -Y.*d.^3];
[~,~,V]=svd(A);
abce=V(:,end);
If nothing else, this could generate a good initial guess for LSQCURVEFIT.
Catégories
En savoir plus sur Get Started with Curve Fitting Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!