clear all, close all, clc
t=[0 1 3 4]';
y=[1 8 11 20]';
plot(t,y,'*');
hold on
A=[t ones(size(t))];
c=A\y;
res1=A*c-y
plot(t,A*c);

A2=ones(size(t));
c2=A2\y;
res2=A2*c2-y
plot(t,A2*c2);

A3=t;
c3=A3\y;
res3=A3*c3-y
plot(t,A3*c3)