MAT a complete reference manual