Shannon interpolation formula for signal reconstruction on Matlab

1.2k Views Asked by At

Let

$$f(t)=\int_{0}^{t}\exp\left(-\frac{1}{1-s^{2}}\right)\,ds,\qquad|t|<1,\text{ otherwise }0.$$

Then the Shannon interpolation theorem gives a reconstruction formula for a sampled version of $f$. Namely, for appropriately chosen $T$:

$$f_{n}(t)=\sum_{n=-\infty}^{\infty}\int_{0}^{n\times 1/T}\exp\left(-\frac{1}{1-s^{2}}\right)\,ds\cdot\frac{\sin(T\times t-n)}{T\times t-n},\qquad |s|<1.$$

Suppose that $T=102$, then $f_{n}(t)$ should return a perfect reconstruction of $f(t)$ (provided that $102>2\times b$, where $\hat{f}(\xi)=0$ for $|\xi|>b$).

Now I tried to plot this on Matlab, but with no success. My most recent attempt was using:

x = -2:0.01:2 % Position vector Fs = 100; % Sampling frequency T = 1/Fs; % Sampling period L = 100; % Length of signal t = (0:L-1)*T; % Time vector s = @(x)heaviside(x+1).*heaviside(-x)+heaviside(x).*heaviside(1-x); % Step function phi = @(x) exp(-1./(1-x.^2)).*s(x); % Bump function f = @(t) symsum(integral(@(x)phi(x),0,n/102)*sinc(102*n-t),n,[-200 200]); plot(f,[0,1])