How to do linear regression?

1 次查看(过去 30 天)
AKANAE CHATTRAIRAT
AKANAE CHATTRAIRAT 2018-8-22
评论: Stephan 2018-8-22
How to do a regression line ?
  1 个评论
Stephan
Stephan 2018-8-22
Do you have access to Optimization Toolbox or to Curve Fitting Toolbox?

请先登录,再进行评论。

回答(2 个)

Star Strider
Star Strider 2018-8-22
To do a simple linear least-square fit, see the mldivide,\ (link) function.
  5 个评论
Star Strider
Star Strider 2018-8-22
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 2018-8-22
I had to think about it for a few minutes. But after understanding what happens, i saw that this is a pretty nice approach.

请先登录,再进行评论。


Image Analyst
Image Analyst 2018-8-22
See my attached demo.

类别

Help CenterFile Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by