Load a labeled signal set containing recordings of whale songs.
load whales
lss
lss =
labeledSignalSet with properties:
Source: {2×1 cell}
NumMembers: 2
TimeInformation: "sampleRate"
SampleRate: 4000
Labels: [2×3 table]
Description: "Characterize wave song regions"
Use labelDefinitionsHierarchy to see a list of labels and sublabels.
Use setLabelValue to add data to the set.
Create a label definition that specifies whether a signal corresponds to a calf or to an adult whale.
calf = signalLabelDefinition("Calf", ...
LabeldataType="logical",DefaultValue=false, ...
Description="Is the specimen a calf, or an adult?")
calf =
signalLabelDefinition with properties:
Name: "Calf"
LabelType: "attribute"
LabelDataType: "logical"
ValidationFunction: []
DefaultValue: 0
Sublabels: [0×0 signalLabelDefinition]
Tag: ""
Description: "Is the specimen a calf, or an adult?"
Use labeledSignalSet to create a labeled signal set.
Add the definition to the labeled signal set. Retrieve the names of the labels.
addLabelDefinitions(lss,calf)
getLabelNames(lss)
ans = 4×1 string
"WhaleType"
"MoanRegions"
"TrillRegions"
"Calf"
Create a label definition that specifies the sex of the whale. Add the label to the set as a sublabel of 'WhaleType'.
Example: labeledSignalSet({randn(100,1)
randn(10,1)},signalLabelDefinition("female")) specifies a two-member set of random
signals containing the attribute "female".
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.
Label name, specified as a character vector or a string scalar.
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.
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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.