best linear fit through the origin in matlab
July 22nd, 2010 by Lawrence David
if you’re trying to solve for m in the equation y = mx, simply:
matlab >> m = x(:) \ y(:)
[found on matlabcentral.]

July 22nd, 2010 by Lawrence David
if you’re trying to solve for m in the equation y = mx, simply:
matlab >> m = x(:) \ y(:)
[found on matlabcentral.]