Update EC2.java

Added function outputWeight to write the WtHT matrix to local file.