How to do linear regression?

1 Ansicht (letzte 30 Tage)
AKANAE CHATTRAIRAT
AKANAE CHATTRAIRAT am 22 Aug. 2018
Kommentiert: Stephan am 22 Aug. 2018
How to do a regression line ?
  1 Kommentar
Stephan
Stephan am 22 Aug. 2018
Do you have access to Optimization Toolbox or to Curve Fitting Toolbox?

Melden Sie sich an, um zu kommentieren.

Antworten (2)

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

Melden Sie sich an, um zu kommentieren.


Image Analyst
Image Analyst am 22 Aug. 2018
See my attached demo.

Kategorien

Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by