Update trainNN.m