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