%EXS 4.6
t= [0 2 4 6 8 10]';
y = [1.0 1.6 1.4 0.6 0.2 0.8]';
A = [ones(size(y)) sin(2*pi*t/12) cos(2*pi*t/12)];
x = A\y
residual = A*x-y
tt=0:0.1:10;
H= x(1)+x(2)*sin(2*pi*tt/12)+x(3)*cos(2*pi*tt/12);
plot(tt, H, t, y,'*');
