Search code examples
matlabdefinition

MATLAB Syntax for classdef


I'm not new to MATLAB, however I have never worked with classes in MATLAB. Looking at some implementation code, which I cannot share due to the license agreement, I have encountered a line on top of *.m file that defines class in following way:

classdef A < b.c

My guess is that it defines class A that belongs to each c of structure b. However, I am not sure, especially about <. Could anyone explain it to me?

Thank you!


Solution

  • This is the syntax for a subclass definition. You will find the extensive documentation here:

    https://de.mathworks.com/help/matlab/matlab_oop/subclass-constructors.html