ZOH non ideal sampling loss formula
Define this  


  Tn=0:Ts:1;


to be


  Tn=0:Ts:1 -Ts;


By defining it the way you have in the program you have not included an integer number of cycles in the samples. This will result in spectral leakage because your sinuoid now does not fit into one frqeuency bin and thus spill out into other bins and this reduces in magnitude.