Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you clear the console in MATLAB?

Tags:

console

matlab

How do you clear the console in MATLAB?

For example, I'm debugging a script that displays a ton of output. I want to clear the console on every run, so I don't have to look through output from old runs.

like image 484
John Avatar asked Jun 02 '09 19:06

John


2 Answers

Short answer, the clc function:

>> clc 

You can also select Edit > Clear Command Window in the MATLAB desktop (older versions) or select Clear Command Window from the Command Window pull-down menu:

enter image description here

like image 140
gnovice Avatar answered Sep 28 '22 02:09

gnovice


>> clc %clear command 

Related functions include:

>> clf %clear figure >> cla %clear axis >> close all %close all windows >> clear %clear workspace of variables 
like image 42
MatlabDoug Avatar answered Sep 28 '22 02:09

MatlabDoug