how to clear in matlab code example
Example 1: how to clear matlab command window
clc //clear command window
clear //clears all variables from current workspace
close all //closes all figures
Example 2: clear all but matlab
clearvars -except NAME