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 Center および File ExchangeGet 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