add nb_train.m