cls.m
% Clear WorkSpace, Command Window and History simultaneously
% Created by Shanrong Zhang, 02/02/2004

clear all;
clc;
com.mathworks.ide.cmdline.CommandHistory.deleteAllHistoryForDesktop; 

Contact us at files@mathworks.com