Interpolation based on sinc function 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'm still not quite sure I understand what you're trying to achieve, but here's an example I cooked up in scilab.

The input is 33 points of a sine wave:

fs = 100; // 10kHz sampling rate
Tin = 1/fs; // Input sampling period
N = 16;
tin = [-N:N]; // Times of samples
f0 = 5;

x = sin(2*%pi*f0/fs*tin + 1.123791823)

clf
subplot(211)
plot(tin,x)


The sampling frequency is 100Hz, the frequency of the sine wave is 5 Hz.

Then, I try to interpolate this up to a sampling frequency of 700Hz using the sinc formula:

Tout = 1/700;
tout = -N:Tout:N;
y = zeros(1,length(tout))
for n = 1:length(tin)
    y =  y + x(n)*sinc(%pi*(tout-tin(n)))
end

plot(tout,y,'r:')
title('Input (blue line) and interpolated (red dotted line)')

subplot(212)
dx = splin(tin,x);
x_interp = interp(tout,tin,x,dx);
plot(tout,y-x_interp)
title('Error')


The results are as plotted below.