6 lines
106 B
Mathematica
6 lines
106 B
Mathematica
|
function Y = myfit2(x,y)
|
||
|
A = [x ones(size(x))]\y;
|
||
|
a = A(1); b = A(2);
|
||
|
Y = y - (a*x + b);
|
||
|
end
|