if T=2pi is a period of your signal, then your are looking for coefficient that respect
x(t)=a0+a1 cos(w0.t)+b1sin(w0.t)+a2cos(2w0.t)+.. with w0=2pi/T
when you consider a period T=2*2pi that means new_w0=2*w0 which means your looking for coefficint new_ak new_bk that veify
x(t)=new_a0+ new_a1 cos(new_w0.t)+....
which explain the difference between your coefficients
look at this submission: http://www.mathworks.com/matlabcentral/fileexchange/37654-get-harmoniques-of-a-real-signal