Create sametrain.m