Added Matrix.merge method to combine matrices