How to do linear regression?

1 visualización (últimos 30 días)
AKANAE CHATTRAIRAT
AKANAE CHATTRAIRAT el 22 de Ag. de 2018
Comentada: Stephan el 22 de Ag. de 2018
How to do a regression line ?
  1 comentario
Stephan
Stephan el 22 de Ag. de 2018
Do you have access to Optimization Toolbox or to Curve Fitting Toolbox?

Iniciar sesión para comentar.

Respuestas (2)

Star Strider
Star Strider el 22 de Ag. de 2018
To do a simple linear least-square fit, see the mldivide,\ (link) function.
  5 comentarios
Star Strider
Star Strider el 22 de Ag. de 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 el 22 de Ag. de 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.

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 22 de Ag. de 2018
See my attached demo.

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by