Fixes to sample code for Matrix2 and Matrix3 classes.