clear all variables except matlab code example Example: matlab clear all clear % Clears all variable data clc % Clears the command line window