Matlab: Publish function runs endless loop

138 Views Asked by At

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.

1

There are 1 best solutions below

1
Prateek Khandelwal On

Have a look here, you are most probably using the publish call in the wrong way, as publish function call takes care of running the script provided as the first argument, adding the call at the bottom of the script would lead such an infinite call.