one way to turn off the display for anova1
p(k)= anova1(Z) % original code line
change to
p(k)= anova1(Z,[],'off') % empty brackets tell matlab there are no groups...the 'off' references the display option and tells matlab to not show these tables and charts