echo on

x = [2 1; 3 1; -3 1];
y = [12; 17; -5];
mb = x\y

% Now solve y=mx+b
y_fit=mb(1)*x(:,1) +mb(2)


echo off




