Dear friends,
I am trying to interpolate two signals of the same sampling rate (1000 Hz). One signal (X1) has the length of 863 while the other (X2) has a length of 1121. I would like to make both of them equal in length. This is the code I wrote for interpolation:
t1=0:1/1000:(length(X1)-1)/1000; t2=0:1/1000:(length(X2)-1)/1000;
NewX1=interp1(t1,X1,X2);
The problem is all values are 'NaN' after the 863th in signal NewX1. "Interp1" works if the original signal (X1) is of different sampling rate. Why does does not it work for two signals of the same sampling rate?
Thank you very much for your assistance in advance.
Abbas Orand
Best Answer