Skip to content

Clear command line, variables and command history in MATLAB

2009 October 26
by Richard Knop

Here are three useful MATLAB commands.

To clear the command line:

clc

To clear all variables:

clear all

To clear the command history:

com.mathworks.mlservices.MLCommandHistoryServices.removeAll

Just putting this information down for my own reference so I won’t have to search for it later.

2 Responses leave one →
  1. Dani permalink
    May 5, 2011

    Just what i needed, how to clear the command history for Matlab R2010!
    Thanks.

  2. jac permalink
    October 10, 2011

    THX MAN

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS