I have defined two classes as follows:
Class pClass
classdef pClass properties fun; end methods function F = pClass(f) F.fun = f; end end end
Class qClass
classdef qClassproperties opset={}; opinds=[];endmethods function M=qClass(opset) opset={opset}; M.opset=opset; M.opinds=[]; endendend
A function 'test' initializes these classes.
function test fHandle=@(x) x; P=pClass(fHandle); Q=qClass(P);end
When I execute the command
test,clear classes;
I receive the warning:
Warning: Objects of 'pClass' class exist. Cannot clear this class or any of its super-classes. Warning: Objects of 'qClass' class exist. Cannot clear this class or any of its super-classes.
I cannot clear the class definitions unless I restart MATLAB.
Best Answer