Linear Regression, line of best fit

331 views (last 30 days)
YM
YM on 17 May 2019
Answered: KSSV on 17 May 2019
If I have data for vectors x = [ ] and y= [ ], how do I find and plot the linear regression/line of best fit? Once I have plotted the line of best fit, how do I record the slope of that line of best fit to some variable "a"?

Answers (1)

KSSV
KSSV on 17 May 2019
To fit a line use n=1.

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!