Main Content

getMemberNames

Get member names in labeled signal set

Description

mnames = getMemberNames(lss) returns a string array containing the member names in the order in which they are stored in the labeled signal set lss.

example

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.

Return a string array with the names of the members.

getMemberNames(lss)
ans = 2x1 string
    "Member{1}"
    "Member{2}"

Set the names of the set members to the whales' nicknames.

setMemberNames(lss,{'Brutus' 'Lucy'})

Verify that the members have the nicknames as names.

getMemberNames(lss)
ans = 2x1 string
    "Brutus"
    "Lucy"

Input Arguments

collapse all

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'.

Output Arguments

collapse all

Member names, returned as a string array.

Version History

Introduced in R2018b