I've created an .m file that pulls and sorts data into a UI table, then I have the ability to publish this to either html or pdf form. I can click in the GUI of matlab publish button and it perfectly prints the table once to publication, but if i insert: publish('MTRChecks.m','html'); at the end of the code, then the program will loop endlessly regenerating the same table without publishing it.
I am using Matlab 2013 B, while not ideal it is my only option.