I have a question on the clear
function in MATLAB. I would like to use the function to remove items from my workspace, in order to freeing up system memory. Just performing the code, I would run into an error otherwise.
Therefore, I'm clearing all the variables that are no longer required. This is especially true for variables used to calculate another one. Let's assume I'd have:
a = 2;
b = 3;
c = a + b;
Thereafter, I would just continue to work with c
. Is there an alternative to clear the workspace for a
and b
other than adding clear a;
clear b;
In other words, is there a function that allows to delete any variable that is just used to compute another variable?