Problem running linear fit y= m*x

2 Ansichten (letzte 30 Tage)
hellafella
hellafella am 22 Apr. 2018
Beantwortet: Star Strider am 22 Apr. 2018
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.

Antworten (1)

Star Strider
Star Strider am 22 Apr. 2018

Use the mldivide,\ (link) function:

m = x(:)\y(:);

Kategorien

Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by