$\texttt{clc/clc()}$ - clears the console
$\texttt{clear/clear all/clear a/clear('a')}$ - removes all variables/same/removes variable a/same
$\texttt{who/who()}$ - print existing variables
a = 2;
b = 2;
who()
clear a;
who()
$\texttt{close/close 1/close(1)/close all}$ - closes current figure/closes figure 1/same/closes all figures
figure(1);
plot(1:10, sin(1:10));
close(1); % I close the figure before it can be shown
$\texttt{pwd/pwd()}$ - prints the current working directory
$\texttt{ls/ls()}$ - lists all files in the current working directory
$\texttt{rm('filename')}$ - deletes a file (immediately and permanently)
$\texttt{gcf/gcf()}$ - get current axis
$\texttt{gca/gca()}$ - get current axis
$\texttt{clf/clf()}$ - clear current figure
figure();
hold on;
x = linspace(0, 10, 1000);
for trial = 1:5
label = sprintf('Trial %d', trial);
plot(x, sin(x + 2 * pi * rand()), 'DisplayName', label);
end
legend('show');