MATLAB: How to avoid running superclass constructor

MATLAB

You have defined a class derived from a parent class with a constructor. There is a constructor in the derived class. MATLAB implicitly runs the constructor of parent class and I do not want in my case. How can I avoid MATLAB implict superclass constructor call? Help me out.

Best Answer

You cannot avoid the superclass constructor being called (explicitly or implicitly) from the subclass constructor. From the documentation: "If you do not make an explicit call to a superclass constructor from the subclass constructor, MATLAB makes the implicit call when accessing the object."
If you don't want your subclass constructor to call the superclass constructor, are you sure that you want the subclass to inherit from the superclass?