Main Content


Get member names in labeled signal set



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.


collapse all

Load a labeled signal set containing recordings of whale songs.

load whales
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.

ans = 2x1 string

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

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

Verify that the members have the nicknames as names.

ans = 2x1 string

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