Update train.m