I implemented an interpolation method in C++ based on this equation
y(t) = x[n]*sinc((t-nT)/T)
where:
n - index of input signal,
x - input signal buffer,
t - is an actual time,
nT - time of input samples,
T - period of input signal.
I calculated it on 33 samples:1+2*16. I tested it on Matlab and C++ on VS 2010. It works great on close frequencies (eg. 24kHz to 20kHz) but when I tested situation where the input signal is 24kHz and has a peak on 8kHz and then I wanted to interpolated it to 700Hz it gave me a peak at 300Hz so it is totally wrong. I expected that the main couse of this situation is that I did not use the cutoff frequency for low pass filter in this equation above. Seriously, I do not know how to add low pass filtration to my method.
Thanks for all your suggestions or advise.
I calculated it on 33 samples:1+2*16.
$\endgroup$T - period of input signal
but I would have calledT
the sampling period. I'm not sure how youinterpolated it to 700Hz
? Does that mean you setT=1/700
? $\endgroup$