Main Content

Add Labels to Project Files

You can use labels to organize project files and communicate information to project users.

Add Labels

To add a label to a project file, in the Files view, select the file. Then, drag the desired label from the Labels panel at the bottom left of the project into the Label Editor panel for the selected file. The Label Editor panel is located at the bottom right of the Files view. To restore the panel if it is minimized, click the icon.

To add a label to multiple project files, in the Files view or in the Dependency Analyzer graph, select the files, right-click, and select Add Label. Choose a label from the list and click OK.

Note

After you add a label to a file, the label persists across file revisions.

To add labels programmatically (for example, in custom task functions) see addLabel.

View and Edit Label Data

When you select a project file in the Files view, the file labels appear in the Label Editor view.

To change a label that belongs to a single-valued category, select the new value from the label list.

You can add additional annotations to labels from categories that you create. In the Label Editor panel, click a label and insert or modify text. Then, click Apply.

Create Labels

Labels exist in two types of categories:

  • Single-valued — You can attach only one label from the category to a file.

  • Multi-valued — You can attach multiple labels from the category to a file.

All projects contain a built-in label category called Classification with several built-in labels. These built-in labels are read-only.

To create your own label categories:

  1. In the Labels panel at the bottom left of the project, right-click and select Create New Category. The Create Category dialog box opens.

  2. Enter a name for the new category.

  3. To create a single-valued label category, select the Single Valued check box. Otherwise, MATLAB® creates a multi-valued label category.

  4. To specify a label data type other than the default String data type, from the Type list, select from the available options.

  5. Click Create.

To create your own labels in a label category:

  1. In the Labels panel at the bottom left of the project, right-click the label category and select Create New Label. The Create Label dialog box opens.

  2. Enter a name for the new label and click OK.

To rename or delete a category or label, right-click it and select Rename or Remove.

To create a new label or label category programmatically, see createLabel or createCategory.

Related Topics