info
Display label, sublabel, or attribute information stored in label definition creator object for multisignal workflow
Since R2020a
Description
info(
displays
information about the specified label, sublabel, or attribute stored in the ldc
,name
)labelDefinitionCreatorMultisignal
object ldc
.
returns the information as a structure.infoStruct
= info(ldc
,name
)
Examples
Display Information On Definitions Stored in Label Definition Creator Object for Multisignal Workflow
Load an existing label definition table.
labelDefFile = fullfile(toolboxdir('driving'), 'drivingdata', 'labelDefsMultiSignal.mat'); ld = load(labelDefFile)
ld = struct with fields:
labelDefs: [6x6 table]
Create a labelDefinitionCreatorMultisignal
object from the label definitions table.
ldc = labelDefinitionCreatorMultisignal(ld.labelDefs)
ldc = labelDefinitionCreatorMultisignal contains the following labels: Car with 0 sublabels and 0 attributes and belongs to None group. (info) LeftLane with 0 sublabels and 0 attributes and belongs to None group. (info) Road with 0 sublabels and 0 attributes and belongs to None group. (info) Sunny with 0 sublabels and 0 attributes and belongs to None group. (info) Urban with 0 sublabels and 0 attributes and belongs to None group. (info) For more details about attributes and sublabels, use the info method.
Add an attribute 'Color'
to the label 'Car'
. Specify the attribute type as 'List'
and add items to the list.
addAttribute(ldc,'Car','Color','List',{'Red','Green','Blue'});
Display the details of the updated labelDefinitionCreatorMultisignal
object.
ldc
ldc = labelDefinitionCreatorMultisignal contains the following labels: Car with 0 sublabels and 1 attributes and belongs to None group. (info) LeftLane with 0 sublabels and 0 attributes and belongs to None group. (info) Road with 0 sublabels and 0 attributes and belongs to None group. (info) Sunny with 0 sublabels and 0 attributes and belongs to None group. (info) Urban with 0 sublabels and 0 attributes and belongs to None group. (info) For more details about attributes and sublabels, use the info method.
Display information about the attribute 'Color'
under the label 'Car'
.
colorStruct = info(ldc,'Car/Color')
colorStruct = struct with fields:
Name: "Color"
Type: List
ListItems: {'Red' 'Green' 'Blue'}
Description: ' '
Display the field ListItems
in the 'Color'
attribute of the label 'Car'
.
colorStruct.ListItems
ans = 1x3 cell
{'Red'} {'Green'} {'Blue'}
Input Arguments
ldc
— Label definition creator for multisignal workflow
labelDefinitionCreatorMultisignal
object
Label definition creator for the multisignal workflow, specified as a labelDefinitionCreatorMultisignal
object.
name
— Name of label, sublabel, or attribute
character vector | string scalar
Name of label, sublabel, or attribute in the ldc
object,
specified as a character vector or string scalar whose form depends on the type of name
you specify.
To specify a label, use the form 'labelName'.
Example: info(ldc,'TrafficLight')
To specify a sublabel, use the form 'labelName/sublabelName'.
Example: info(ldc,'TrafficLight/RedLight')
To specify an attribute, use the form 'labelName/attributeName' or 'labelName/sublabelName/attributeName'.
Example: info(ldc,'TrafficLight/Active')
Example: info(ldc,'TrafficLight/RedLight/isOn')
Output Arguments
infoStruct
— Information structure
structure
Information structure, returned as a structure that contains the fields
Name
, SignalType
(for labels),
LabelType
(for labels), Type
(for sublabels and
attributes), Description
, Attributes
(when
pertinent), Sublabels
(when pertinent),
DefaultValue
(for attributes), and ListItems
(for List attributes).
Version History
Introduced in R2020a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)