s = superclasses(className)
s = superclasses(obj)
| Parameter | Description |
|---|---|
| className | a class name as a string or character vector. |
| obj | a classdef object or handle. |
| Parameter | Description |
|---|---|
| s | an N-by-1 cell array of char with the names of all visible superclasses, nearest ancestor first. |
superclasses returns the names of all visible superclasses of a class, whether specified by name or by an object of that class. Ancestors are returned nearest first, and each name appears once.
d = [tempdir(), 'nelson_help_superclasses/'];
mkdir(d);
filewrite([d, '/NelsonHelpBase.m'], ["classdef NelsonHelpBase"; "end"]);
filewrite([d, '/NelsonHelpDeriv.m'], ["classdef NelsonHelpDeriv < NelsonHelpBase"; "end"]);
addpath(d);
superclasses('NelsonHelpDeriv')
| Version | Description |
|---|---|
| 2.0.0 | initial version |