MATLAB: How to reset the “UntitledN” editor counter

editor

When I am using the editor and hit ctrl+n, a new file tab opens up with a default name UntitledN, where N is the number of times I have done this plus 1. Now I am up to 34 in the current folder. Note that I do not have any files that are actually saved as UntitledN for any N.
How can I reset this counter?
Just curious.

Best Answer

Is this your puzzler?
system('matlab &'); exit
Or let's find out the type of the counter by provoking an overflow:
Editor = com.mathworks.mlservices.MLEditorServices;
for i = 1:65536
Editor.newDocument('');
Editor.closeAll;
end
EDITED: At least not an 8 bit counter. Waiting for the 16 bit overflow will last too long on my computer...