Modified ELM to take matrices as inputs