My original signal as
f1=2; f2=5; fs=100; Ts=1/fs; t=0:Ts:1; xt=cos(2*pi*f1*t)+cos(2*pi*f2*t); figure plot(t,xt)
as shown below figure.
and my sampled signal with fs=12 which is greater than two times of maximum frequency, 2*f2=10;
fs=12; Ts=1/fs; tn=0:Ts:1; xn=cos(2*pi*f1*tn)+cos(2*pi*f2*tn);
and then I want to reconstruct the original signal with sampled signal.
I tried it using the matlab function interp1 as below
I compared original signal and reconstructed signal, but they are different as shown below figure.
How to reconstruct original signal?