# Reconstruction using sinc

The signal that I produce above. What is the reason for it to slide to the right? In oversampling at Nyquist rate can I make like below picture ? do you think the signal i produced at nyquist rate is correct, why so on the right? I was expecting to draw as below picture. (Blue is the my signal, Red ones sampling and Yellow is the reconstruction using sinc.) If needed I can share my all code. Thank you all.

• Are you applying filter? It could be the filter delay. – jithin Apr 18 at 14:46
• No, I am not applying any filter. x1reconstructed = zeros(1,length(t)); samples1 = length(t1); for i = 1:1:length(t) for n = 1:1:samples1 x1reconstructed(i) = x1reconstructed(i) + signal2(n)*sinc((t(i)-n*Ts1)/Ts1); end end This is my reconstruct part for first oversampling at nyquist rate – Oğuzhan Kırlar Apr 18 at 14:51

After seeing the code, I think the mistake may be

sinc((t(i)-n*Ts1)/Ts1)


Change it to

sinc((t(i)-(n-1)*Ts1)/Ts1)


An extra Ts1 delay was being applied to sinc. The index $$n$$ starts from 1 for MATLAB but it should start from 0.

• I wanna ask one more question. Do you have any idea why sampling at nyquist rate some red stick is not exist true places ? The second is not in the middle, for example – Oğuzhan Kırlar Apr 18 at 15:00
• "true places" means peaks? – jithin Apr 18 at 15:26
• yes i want to say peaks – Oğuzhan Kırlar Apr 18 at 15:55