Added some methods to Matrix.java such as set and get
Added extra logic in subarray