MATLAB: How to Delete Arrays

delete arraysMATLAB and Simulink Student Suite

How does one delete arrays (completely) once they have served their specific purpose (saving memory & decluttering the written program)?
I do not want to rename, redimension and then reuse the array (as the coding will inevitably be more difficult to follow and debug).

Best Answer

If "myArray" is your array name:
clear('myArray');