MATLAB code:

 %interpolation two every samples (two points in between every two samples)%makes even vector even vector and odd vector another odd numbered vectorx8 = [5,8,11,14];count99=1;for count3 = 1:1:length(x)x_interpolated1(:,count99) = x(:,count3);if count3 ~= length(x)count99=count99+1;x_interpolated1(:,count99) = (2*x(:,count3)/3+x(:,count3+1)/3);count99=count99+1;x_interpolated1(:,count99) = (x(:,count3)/3+2*x(:,count3+1)/3);count99=count99+1; end end

C++ code:

 //interpolation of a vector in c++ h_intp; //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;                              }               }