Effacer les filtres
Effacer les filtres

Fit and Polyfit (LAR vs. Least squares)

50 vues (au cours des 30 derniers jours)
sks le 4 Juil 2013
I am trying to better understand the difference between fit and polyfit. Am I right to think that fit for polynomials still uses the least absolute residual robust (LAR) method rather than the least squares method (polyfit)?

Réponse acceptée

Guru le 4 Juil 2013
You can find out by asking for the output argument:
[fitobject,gof,output] = fit(x,y,fitType)
But the real difference between fit and polyfit are the options that you can choose as well as polyfit is strictly limited to polynomials and uses the least squares method.
  1 commentaire
sks le 4 Juil 2013
Thank you for the quick answer.

Connectez-vous pour commenter.

Plus de réponses (0)


En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by