ZOH non ideal sampling loss formula Hello i am trying to calculate the amplitude loss of non ideal sampling.
My signals amplitude is 10 at 70 frequency.
When we sample it at Fs=400 we have al 0.511 loss as shown in plot bellow.
How can we get this 0.511 using the ZOH sinc formula bellow. What is f,Tpm,Ts is here so i could see the 0.511 loss? MATLAB code bellow.
Thanks.





f3=70;
Fs=400; % sampling frequency is a bit above 2 times to get all the peaks.
Ts=1/Fs;
Tn=0:Ts:1;
fft_L=length(Tn);
y4_samples=10*sin(2*pi*f3*Tn);
%stem(Tn_new,y4_samples);
ff=fft(y4_samples);
ff1 = abs(ff/fft_L);% normalised FFT  
fft2 = ff1(1:floor(fft_L/2)+1); %first half of the vector
fft2(2:end) = 2*fft2(2:end); %we multiply the amplitude by 2
f = Fs*(0:fft_L/2)/fft_L;%frequency vector
plot(f, fft2)
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.