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