How to do linear regression?

1 vue (au cours des 30 derniers jours)
AKANAE CHATTRAIRAT
AKANAE CHATTRAIRAT le 22 Août 2018
Commenté : Stephan le 22 Août 2018
How to do a regression line ?
  1 commentaire
Stephan
Stephan le 22 Août 2018
Do you have access to Optimization Toolbox or to Curve Fitting Toolbox?

Connectez-vous pour commenter.

Réponses (2)

Star Strider
Star Strider le 22 Août 2018
To do a simple linear least-square fit, see the mldivide,\ (link) function.
  5 commentaires
Star Strider
Star Strider le 22 Août 2018
Thank you!
Actually, I got the idea for the column of ones from the documentation for the regress (link) function when I first began using it, many years ago. (I simply forgot to include polyfit and friends initially.)
Stephan
Stephan le 22 Août 2018
I had to think about it for a few minutes. But after understanding what happens, i saw that this is a pretty nice approach.

Connectez-vous pour commenter.


Image Analyst
Image Analyst le 22 Août 2018
See my attached demo.

Catégories

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