Problem running linear fit y= m*x

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.

답변 (1개)

Star Strider
Star Strider 2018년 4월 22일

0 개 추천

Use the mldivide,\ (link) function:

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

카테고리

도움말 센터File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

질문:

2018년 4월 22일

답변:

2018년 4월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by