Main Content

labelDefinitionsSummary

Get summary table of signal label definitions

Description

example

T = labelDefinitionsSummary(lbldefs) returns a table, T, with the properties of the label definitions contained in lbldefs, a vector of signalLabelDefinition objects.

T = labelDefinitionsSummary(lss) returns a table, T, with the properties of the label definitions contained in the labeledSignalSet object lss.

T = labelDefinitionsSummary(___,lblname) returns a table with the properties of the label lblname.

T = labelDefinitionsSummary(___,lblname,'sublbls') returns a table of the properties of the sublabels defined for lblname.

Examples

collapse all

Load a labeled signal set containing recordings of whale songs.

load whales
lss
lss = 
  labeledSignalSet with properties:

             Source: {2x1 cell}
         NumMembers: 2
    TimeInformation: "sampleRate"
         SampleRate: 4000
             Labels: [2x3 table]
        Description: "Characterize wave song regions"

 Use labelDefinitionsHierarchy to see a list of labels and sublabels.
 Use setLabelValue to add data to the set.

Visualize the label properties of the set.

labelDefinitionsSummary(lss)
ans=3×9 table
      LabelName        LabelType     LabelDataType     Categories     ValidationFunction    DefaultValue             Sublabels             Tag            Description         
    ______________    ___________    _____________    ____________    __________________    ____________    ___________________________    ___    ____________________________

    "WhaleType"       "attribute"    "categorical"    {3x1 string}       {["N/A"   ]}       {0x0 double}    {0x0 double               }    ""     "Whale type"                
    "MoanRegions"     "roi"          "logical"        {["N/A"   ]}       {0x0 double}       {0x0 double}    {0x0 double               }    ""     "Regions where moans occur" 
    "TrillRegions"    "roi"          "logical"        {["N/A"   ]}       {0x0 double}       {0x0 double}    {1x1 signalLabelDefinition}    ""     "Regions where trills occur"

Visualize the properties of the TrillRegions label.

labelDefinitionsSummary(lss,"TrillRegions")
ans=1×9 table
      LabelName       LabelType    LabelDataType    Categories    ValidationFunction    DefaultValue             Sublabels             Tag            Description         
    ______________    _________    _____________    __________    __________________    ____________    ___________________________    ___    ____________________________

    "TrillRegions"      "roi"        "logical"      {["N/A"]}        {0x0 double}       {0x0 double}    {1x1 signalLabelDefinition}    ""     "Regions where trills occur"

Visualize the properties of the TrillRegions sublabels.

labelDefinitionsSummary(lss,"TrillRegions",'sublbls')
ans=1×8 table
     LabelName      LabelType    LabelDataType    Categories    ValidationFunction    DefaultValue    Tag     Description 
    ____________    _________    _____________    __________    __________________    ____________    ___    _____________

    "TrillPeaks"     "point"       "numeric"      {["N/A"]}        {0x0 double}       {0x0 double}    ""     "Trill peaks"

Input Arguments

collapse all

Signal label definitions, specified as a signalLabelDefinition object or a vector of signalLabelDefinition objects.

Example: signalLabelDefinition("Asleep",'LabelType','roi','LabelDataType','logical') can label a region of a signal in which a patient is asleep.

Labeled signal set, specified as a labeledSignalSet object.

Example: labeledSignalSet({randn(100,1) randn(10,1)},signalLabelDefinition('female')) specifies a two-member set of random signals containing the attribute 'female'.

Label or sublabel name. To specify a label, use a character vector or a string scalar. To specify a sublabel, use a two-element cell array of character vectors or a two-element string array:

  • The first element is the name of the parent label.

  • The second element is the name of the sublabel.

Example: signalLabelDefinition("Asleep",'LabelType','roi') specifies a label of name "Asleep" for a region of a signal in which a patient is asleep during a clinical trial.

Example: {'Asleep' 'REM'} or ["Asleep" "REM"] specifies a region of a signal in which a patient undergoes REM sleep.

Output Arguments

collapse all

Summary table with the properties of a label.

Version History

Introduced in R2018b