%% Edit Label Definition
% Load a labeled signal set containing recordings of whale songs. Get the names of the labels.

load whales
lss
getLabelNames(lss)

%
% The first label corresponds to the type of whale. Get the types available in the set.

lbldefs = getLabelDefinitions(lss);
types = lbldefs(1)
types = types.Categories

%
% Modify the label to incorporate sperm whales and killer whales. Verify that the labeled signal set includes the two new whale types.

editLabelDefinition(lss,'WhaleType', ...
    'Categories',{'sperm','killer'})

lbldefs = getLabelDefinitions(lss);
types = lbldefs(1).Categories

%
% The definition for trill regions has a sublabel that identifies peaks.

lbldefs(3).Sublabels

% Change the description of the sublabel.

editLabelDefinition(lss,["TrillRegions" "TrillPeaks"],'Description','Peaks of trill regions')

lbldefs = getLabelDefinitions(lss);
lbldefs(3).Sublabels

%
% Copyright 2018 The MathWorks, Inc.