Update maxminmat.cpp