MATLAB: How to clear the command history from the command line in MATLAB

clearcommanddeletehistoryMATLAB

I would like to clear the command history from the command line in MATLAB.

Best Answer

In MATLAB 7.0 (R14), the following command will clear the Command History:
com.mathworks.mlservices.MLCommandHistoryServices.removeAll;
In MATLAB 6.5 (R13), use the following command:
com.mathworks.ide.cmdline.CommandHistory.deleteAllHistoryForDesktop;
Please note that the use of these commands is not supported, and they may change in a future release.