Matrix interpolation

it would be more readable to write a helper function to compare matrices for testing