Feed on

if you’re trying to solve for m in the equation y = mx, simply:

matlab >> m = x(:) \ y(:)

[found on matlabcentral.]

Bookmark and Share

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

One Response to “best linear fit through the origin in matlab”

  1. on 11 Jun 2020 at 6:45 am suba suba

    Really enjoyed this blog post, is there any way I can get an alert email every time there is a fresh article?

Did I get this wrong? Let me know!

Trackback URI | Comments RSS

More blogs about http://desk.stinkpot.org:8080/tricks.