Class: matlab.mixin.Heterogeneous
Package: matlab.mixin
Vertical concatenation for heterogeneous arrays
C = vertcat(A1,A2,...)
C = vertcat(
concatenates the A1
,A2
,...)matlab.mixin.Heterogeneous
objects A1
, A2
, and so on, to form the array C
. All input arrays must have the same number of columns.
The class of object arrays A1,A2,...
must be derived from the same root class of a matlab.mixin.Heterogeneous
hierarchy.
MATLAB® calls:
C = vertcat(A1,A2,...)
for the expression:
C = [A1;A2;...]
when A1
and A2
, and so on are arrays of matlab.mixin.Heterogeneous
objects.
If all input arguments are of the same specific class, the class of the resulting array is unchanged. If all input arguments are of different subclasses of a common superclass that is derived from matlab.mixin.Heterogeneous
, then the result is a heterogeneous array. The array's class is that of the most specific superclass shared by all input arguments.
If all input arguments are not members of the same heterogeneous hierarchy, MATLAB calls the convertObjects
method, if defined by the dominant root class (the first argument or the left-most element in the concatenation if no other class is dominant).
The horzcat
method is sealed in the class matlab.mixin.Heterogeneous
and, therefore, you cannot override it in subclasses.
|
Object array of class |
|
Object array of class |
|
Array resulting from the specified vertical concatenation. The class of this array is that of the most specific superclass shared by the input arguments. |