matrix.java updayte

update for -1 to 0