Unit testing calculating matrix M
Calc matrix M works.