How to find the gradient of the best fit line?

14 views (last 30 days)

Answers (1)

KSSV
KSSV on 18 Oct 2020
Gradient is slope...you already have it in your hand..
p = polyfit(x,y,1) ;
m = p(1) % slope of line

Categories

Find more on Mathematics in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!