Explanation

clear classes is not recommended. If you modify a class definition, MATLAB automatically updates it. You do not need to clear classes to instantiate objects using the new definition. 

In addition to clearing class definitions, clear classes also clears variables, scripts and functions. Using clear classes causes MATLAB to recompile previously cached code, and can decrease performance.


Suggested Action

When possible, remove or replace instances of clear classes in your code.

For more information, see Automatic Updates for Modified Classes.