MATLAB code:
%interpolation two every samples (two points in between every two samples) end end |
C++ code:
//interpolation of a vector in c++ <Complex> h_intp[46]; //complex int count99 =0; for(int count3=0; count3<32/2;count3+=1){ h_intp[count99] = h[count3].real().val; if(count3!=(32/2) -1){ count99 = count99+1; h_intp[count99]= (2*h[count3].real().val/3) + h[count3+1].real().val/3; count99 = count99+1; h_intp[count99]= (h[count3].real().val/3) + 2*h[count3+1].real().val/3; count99 = count99+1; } } |