%% Create Label Definition Creator Object for Multisignal Workflow and Add Label Definitions
% Create an empty labelDefinitionCreatorMultisignal object.

ldc = labelDefinitionCreatorMultisignal

% Add a label with the name 'Vehicle'. Specify the type as 'Rectangle'. Adding a 'Rectangle' also adds a 'Cuboid' entry to the label definitions table.

addLabel(ldc,'Vehicle','Rectangle')

% Add an attribute with the name 'Color' to the label 'Vehicle'. Specify the attribute type as a string with the value 'Red'.

addAttribute(ldc,'Vehicle','Color',attributeType.String,'Red')

% Add a sublabel with the name 'Wheel' to the label 'Vehicle'. Specify the type of the sublabel as 'Rectangle'.

addSublabel(ldc,'Vehicle','Wheel','Rectangle')

% Add an attribute called 'Diameter' to the sublabel 'Wheel'. Specify the attribute value as a 'Numeric' scalar.

addAttribute(ldc,'Vehicle/Wheel','Diameter','Numeric',14)

% Display the details of the updated labelDefinitionCreatorMultisignal object.

ldc

% Create a label definitions table from the definitions stored in the object.

labelDefs = create(ldc)

% Copyright 2019 The MathWorks, Inc.