Added a test case for changing the stored matrix and recalculating.