Create matrix.py

changed for min and max value