lettura simple

Clearing Matlab Workspace

let me tell you about a little trick I learned for cleaning up the Matlab command window.

As you enter commands, that window can quickly become cluttered and confusing, but fear not! With just a few keystrokes, you can clear out all the previous output and restore some order to your interactive environment.

Matlab Workspace example

Matlab's interactive environment can become cluttered and confusing after a while.

interactive environment of Matlab (command line)

Now, pay close attention. To clear the screen, all you need to do is type the command "clc". Yes, it's that simple.

clc

This nifty little command erases the previous output without touching any of the variables or values in your workspace.

In other words, it keeps the good stuff and gets rid of the mess.

Now the screen is cleaner

After clearing the screen, the workspace is the same.

Session variables, values, and command history are still in memory, but the screen is cleaner.

But wait, there's more! If you really want to start fresh, you can also clear out all the session variables and values with the command "clear".

clear

The "clear" command removes all variables and values from the session memory (workspace).

"clear" command removes

This will wipe the slate clean and give you a nice, blank canvas to work with.

So there you have it. A quick and easy way to keep your Matlab command window neat and tidy.




Report a mistake or post a question




FacebookTwitterLinkedinLinkedin