clear, clc, clf
t=(0:2:10)';
Ht=[1 1.6 1.4 0.6 0.2 0.8]';
%H(t)=h0+a1*sin(2*pi*t/12)+a2*cos(2*pi*t/12)
A=[ones(6,1) sin(2*pi*t/12) cos(2*pi*t/12)]
plot(t,Ht,'o')
ha=A\Ht
xlin=0:0.2:10;
ylin=ha(1)+ha(2)*sin(2*pi*xlin/12)+ha(3)*cos(2*pi*xlin/12);
hold on
plot(xlin,ylin)