This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Class: dataset

Horizontal concatenation for dataset arrays

The dataset data type might be removed in a future release. To work with heterogeneous data, use the MATLAB® table data type instead. See MATLAB table documentation for more information.


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


ds = horzcat(ds1, ds2, ...) horizontally concatenates the dataset arrays ds1, ds2, ... . You may concatenate dataset arrays that have duplicate variable names, however, the variables must contain identical data, and horzcat includes only one copy of the variable in the output dataset.

Observation names for all dataset arrays that have them must be identical except for order. horzcat concatenates by matching observation names when present, or by position for datasets that do not have observation names.

See Also


Was this topic helpful?