Declared ntrn=array(dim=c(nm,nt))