I need to stop printing to command window for some part of my code. Suppose I have a code:
disp('a');disp('b');disp('c');
Output would be
abc
However, I want to stop printing in some parts to command window even if there is disp(), sprinft() or anything that prints… So I am looking for a command to be used like this:
disp('a');stop printingdisp('b');start printingdisp('c');
to get a result
ac
The reason I need this is that I made a windows batch file, which only opens command window and shows that is printied by my script. In this script, connection information to database is automatically printed (login,password) and I do not want that printed. There are few work arounds: change connection to database functions so that login info wouldn't be printed (however they are not in matlab format, so difficult to change) or instead of using command window, create some txt file, write all info I want to show to it and automatically open it. But I hope there is a simple command to do it.
Function disp() is only an EXAMPLE. I have no idea what kind of code prints my logon information to command window.
Best Answer