> How can I export the ANOVA results as a PNG?
If you're refering to the boxplot results, to save a figure as png, saveas(fig,filename,'png') where fig is the figure handle and filename is the name or, better yet, the full path (using fullfile) of the png output file. Get the figure handle using gcf. If you're refering to the ANOVA table displayed in the figure, you woudn't want to insert that into a document as an image. It would be much better to save the table variable to a text file. Example:
[p, tbl, stats] = anova1(___);
writecell(tbl,'anovaresults.txt')
The txt file will be comma separated and will not maintain the column-aligned formatting. However, it will be easy to read back into Matlab using
tbl = readcell('anovaresults.txt');
Update If you're using Matlab R20201a or later, you can use formattedDisplayText to convert the table to a string that maintains its format which is demonstrated in this community highlight. The string can then be written to a text file using fprintf or another text writing function. If the text file is going to be read back into Matlab, the first option is best. If the file is meant for human eyes, the formattedDisplayText option is best.
[p, tbl, stats] = anova1(___);
tblStr = formattedDisplayText(tbl);
fid = fopen('anovaTable.txt', 'wt');
fileCleanup = onCleanup(@()fclose(fid));
fprintf(fid, formatSpec, tblStr);
Sample of results: