val= getLabelValues(lss)returns a table containing the label values for all members of the labeled signal setlss.
val= getLabelValues(lss,midx)returns a table containing the label values for the member specified bymidx.
[val,sublbltbl] = getLabelValues(lss,midx,lblname)returns the value of the label namedlblname. Iflblnamehas sublabels, then the tablesublbltblshows the structure of the label value and its sublabel variables.
[___] = getLabelValues(___,'LabelRowIndex',ridx)specifies the row index,ridx, of an ROI or point label whose value you want to get.
[___] = getLabelValues(___,'SublabelRowIndex',sridx)specifies the row index,sridx, of an ROI or point sublabel whose value you want to get.
Load a labeled signal set containing recordings of whale songs.
loadwhaleslss
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.
Get the values of the labels.
lbls = getLabelValues(lss)
lbls=2×3 tableWhaleType MoanRegions TrillRegions _________ ___________ ____________ Member{1} blue {3x2 table} {1x3 table} Member{2} blue {3x2 table} {1x3 table}
Display the moan ROI limits for the second signal of the set.
Example:labeledSignalSet({randn(100,1) randn(10,1)},signalLabelDefinition('female'))指定了一个带两组random signals containing the attribute'female'.
midx—Member row number positive integer
Member row number, specified as a positive integer.midxspecifies the member row number as it appears in theLabelstable of a labeled signal set.
lblname—Label or sublabel name character vector|string scalar|cell array of character vectors|string array
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.
ridx—Label row index positive integer
Label row index, specified as a positive integer. This argument applies only for ROI and point labels.
sridx—Sublabel row index positive integer
Sublabel row index, specified as a positive integer. This argument applies only when a label and sublabel pair has been specified inlblnameand the sublabel is of type ROI or point.
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.