interpolates two matrices in place