Problem running linear fit y= m*x
Show older comments
how do you run a linear fit for y= m*x. I don't want to use polyfit(x,y,1) as this gives y=mx+b.
Answers (1)
Star Strider
on 22 Apr 2018
Use the mldivide,\ (link) function:
m = x(:)\y(:);
Categories
Find more on Linear and Nonlinear Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!