Class of Heterogeneous Arrays
The class of a heterogeneous array is that of the most specific superclass shared by the
objects of the array.
If the following conditions are true, the concatenation and subscripted assignment
operations return a heterogeneous array:
- The objects on the right side of the assignment statement are of different classes
- All objects on the right side of the assignment statement derive from a common
subclass of matlab.mixin.Heterogeneous
For example, form an array by concatenating objects of these classes. The class of a1 is
ClassA:
a1 = [SpecificA,SpecificB];
class(a1)
Designing Heterogeneous Class Hierarchies