Main Content

Using Signal Labeler App

App Workflow

A typical workflow for labeling signals using the Signal Labeler app is:

  1. Import Data into Signal Labeler — Select any real or complex signal available in the MATLAB® Workspace. The app accepts numeric arrays, MATLAB timetables, and labeledSignalSet objects. Read data from files or use signalDatastore objects as input. With an Audio Toolbox™ license you can Import and Play Audio File Data in Signal Labeler and read labeled signal sets from audioDatastore (Audio Toolbox) objects.

  2. Create or Import Signal Label Definitions — Define labels to annotate signal attributes, regions, or points of interest quickly and consistently using logical, categorical, numerical, or string values. You can also import signal label definitions stored in MAT-files.

  3. Label Signals Interactively or Automatically — Label signals interactively. Automatically label signal peaks or use your own Custom Labeling Functions. Label several signals at once or use the autolabeling mode of the app to inspect labeling results before committing them.

  4. Customize Labeling View — Use spectrum and spectrogram to aid labeling and show or hide the label viewer.

  5. Feature Extraction Using Signal Labeler — Extract time-domain or frequency-domain features from members in a labeled signal set and generate labels from these features. Export features to the MATLAB workspace or the Classification Learner app.

  6. Dashboard — Monitor labeling progress and inspect label value distributions.

  7. Export Labeled Signal Sets and Signal Label Definitions — Export labeled signal sets and label signal definitions to the MATLAB Workspace or to MAT-files.

Example: Label Points and Regions of Interest in Signal

Define a vector with two acute peaks and one flat peak. Use Signal Labeler to label the peaks and mark the flat peak as different from the others.

data = [25 8 15 5 6 10 10 3 1 20 7];

Open Signal Labeler. Import the data vector. On the Labeler tab, click Import, select From Workspace in the Members list, select the data signal in the dialog box that appears, and click Import and Close. Select the check box next to the signal name in the Labeled Signal Set Browser to display the signal in the time plot.

Label the signal peaks. Start by creating a signal label definition. Click Add Definition. In the dialog box, specify Label Name as Peak, Label Type as Point, and Data Type as numeric.

With the Peak definition highlighted in the Label Definitions browser, select Peak Labeler in the Automate Value gallery. Click Auto-Label and select Auto-Label All Signals. Click OK in the dialog box that appears. Signal Labeler labels the three peaks and annotates their locations.


Create a sublabel for Peak to annotate the flat peak, which is the second of the three. With Peak still selected in the Label Definitions browser, click Add Definition and select Add sublabel definition. Specify Label Name as Flat, Label Type as ROI, and Data Type as logical.

Select the point label for the flat peak. You can select the label by clicking it in the Labeled Signal Set Browser, in the time plot, or in the label viewer. Selecting the label highlights it in all three places. Select Flat in the Label Definitions browser. A shaded region appears on the signal plot. Move and resize the region until it encloses the flat peak. To accept a label, click the Accept check mark in the Options section of the toolstrip, press Enter, or double-click the shaded region.


Export the labeled signal. Click Export and select Labeled Signal Set To File. Name the file peaks.mat. Click Export.

Inspect the labeled signal set you created. Load peaks.mat into the MATLAB® Workspace. The labeledSignalSet object is called ls. Verify that the data source is the vector you created at the beginning. Inspect the signal label definition.

load peaks
src = getSignal(ls,1)'
src = 1×11

    25     8    15     5     6    10    10     3     1    20     7

lbl = getLabelDefinitions(ls)
lbl = 
  signalLabelDefinition with properties:

                      Name: "Peak"
                 LabelType: "point"
             LabelDataType: "numeric"
        ValidationFunction: []
    PointLocationsDataType: "double"
              DefaultValue: []
                 Sublabels: [1x1 signalLabelDefinition]
                       Tag: ""
               Description: ""

 Use labeledSignalSet to create a labeled signal set.

See Also



Related Examples

More About