Main Content

Access Frequently Used Features and Commands from the Requirements Editor

You can access your most frequently used features and commands in the Requirements Editor by using the quick access toolbar. You can customize the toolbar by adding actions from the toolstrip, reorganizing the toolbar buttons, and showing the button labels. You can also add commands to the toolbar that run MATLAB® language statements.

The quick access toolbar preferences persist across MATLAB sessions. The toolbar is always visible, even if the toolstrip is minimized.

Access the Quick Access Toolbar

The quick access toolbar is in at the top right corner of the Requirements Editor.

Default view of the quick access toolbar. The default toolbar contains quick actions for cut, copy, paste, a Favorite Commands menu, and a link to the Requirements Toolbox product documentation.

The default buttons allow you to copy, cut, and paste requirements, referenced requirements, and justifications. You can create and run favorite commands by clicking the Favorites icon MATLAB and Simulink Favorite Commands icon to open the Favorite Commands menu. You can also access the Requirements Toolbox™ documentation by clicking the help button MATLAB and Simulink help button..

Tip

You can add the Requirements Editor to the MATLAB or Simulink® quick access toolbars from the Apps tab by right-clicking the Requirements Editor app and selecting Add to Quick Access Toolbar. For more information, see Customize MATLAB Toolbars and Access Frequently Used Features and Commands in Simulink (Simulink).

Customize the Quick Access Toolbar

You can customize the quick access toolbar by adding and removing actions, rearranging the buttons, and showing the button labels. You can also restore the default toolbar buttons.

Add and Remove Actions

You can add actions to the quick access toolbar by right-clicking a toolstrip button and selecting Add to Quick Access Toolbar. You can also add favorite commands to the toolbar by using the Favorite Commands menu.

You can remove non-default actions, including favorite commands, by right-clicking the button in the toolbar and selecting Remove from Quick Access Toolbar.

Rearrange Buttons

You can rearrange the quick access toolbar buttons by clicking and dragging the buttons.

A partition separates the default and non-default toolbar buttons. You cannot move buttons across the partition.

Show and Hide Button Labels

Each quick access toolbar button has a label that describes the action it performs. You can show the label for a button by right-clicking the toolbar button and selecting Show Label.

You can hide the label by right-clicking the button and selecting Hide Label.

Restore the Default Toolbar

The default quick access toolbar contains actions to copy, cut, paste, open the Favorite Commands menu, and access the documentation.

You can restore the toolbar to its default state by right-clicking in the toolbar and selecting Restore Defaults.

Restoring the default toolbar:

  • Removes non-default action buttons, including favorite commands

  • Arranges the default buttons to their default order

  • Hides button labels

Create and Run Favorite Commands

You can create favorite commands to run a group of MATLAB language statements by using the Favorite Commands menu.

  1. In the quick access toolbar, click the Favorites icon .

  2. In the Favorite Commands menu, click New Favorite.

  3. In the Favorite Command Editor, enter a name for the command in the Label field.

    Favorite Command Editor.

  4. Select the command type from the Type list. Scripts execute in the base workspace, while functions execute in a limited scope. For more information, see Base and Function Workspaces.

  5. Enter your MATLAB code in the Code field.

  6. Select the category to place the command in from the Category list. The Favorite Commands category is selected by default.

  7. Choose an icon for the command by selecting from the Icon list. You can use a custom icon by setting Icon to Specify custom icon.

  8. To add the command to the quick access toolbar, select Add to quick access toolbar. To show the label for the toolbar button, select Show label on quick access toolbar.

  9. Click OK.

You can run the command by clicking the Favorites icon and clicking the command or by clicking the icon in the quick access toolbar.

Add a Favorite Command Category

To organize your favorite commands into groups, create categories. To create a category, in the Favorite Command Editor, click New Category. Enter a name for the category in the Label field, then click OK.

Edit, Delete, and Organize Favorite Commands

You can edit, delete, and organize existing favorite commands and categories.

To edit a favorite command or category, right-click the command or category and select Edit Favorite or Edit Category. Make changes in the editor, then click OK.

To delete a favorite command or category, right-click the command or category and select Delete Favorite or Delete Category. Deleting a category deletes all favorite commands in the category.

Related Topics