Fixes to sample code for Matrix2 and Matrix3 classes.
Merge pull request #2049 from PatMahoney/master

Fixes to sample code and doc for Matrix2 and Matrix3 classes.