Main Content


(Not Recommended) Vertical concatenation for dataset arrays

The dataset data type is not recommended. To work with heterogeneous data, use the MATLAB® table data type instead. See MATLAB table documentation for more information.


ds = vertcat(ds1, ds2, ...)


ds = vertcat(ds1, ds2, ...) vertically concatenates the dataset arrays ds1, ds2, ... . Observation names, when present, must be unique across datasets. vertcat fills in default observation names for the output when some of the inputs have names and some do not.

Variable names for all dataset arrays must be identical except for order. vertcat concatenates by matching variable names. vertcat assigns values for the "per-variable" properties (e.g., Units and VarDescription) in ds from the corresponding property values in ds1.

See Also