Object Arrays

Object array construction and concatenation; heterogeneous arrays



emptyCreate empty array of specified class


matlab.mixin.HeterogeneousSuperclass for heterogeneous array formation


Build Object Arrays

Construct Object Arrays

Build object arrays in the constructor and return the array as the output argument.

Initialize Object Arrays

MATLAB® calls the class constructor with no arguments to initialize array elements with a default object.

Initialize Arrays of Handle Objects

MATLAB uses a default object to initialize the empty elements of an array of handle objects.

Empty Arrays

Empty arrays have no elements, but are of a certain class.

Accessing Dynamic Properties in Arrays

Access dynamic properties in object arrays by referring to individual objects.

Concatenating Arrays

Concatenation Methods

You can concatenate objects into arrays.

Concatenating Objects of Different Classes

MATLAB follows specific rules when you attempt to create an array with objects of different classes.

Object Converters and Class of Arrays

Implicit Class Conversion

MATLAB attempts to convert elements to the class of the array as a result of concatenation or assignment.

Object Converters


Determine Array Class

You can determine the class of an array.

Heterogeneous Arrays

Designing Heterogeneous Class Hierarchies


Heterogeneous Array Constructors
