I noticed the following typo at line 49 in PetscMat.m function err = SetFromOptions(obj) err = calllib('libpetsc', 'MatSetSetFromOptions', obj.pobj);PetscCHKERRQ(err); end