Annotations are visual elements that you can use to add descriptive notes and callouts to your model. You can also add annotations that perform an action when you click them. Shortcuts on the Simulink® Editor palette help you to create annotations.
Text annotations can contain any combination of:
Equations using TeX commands
Hyperlinks that open a website or perform MATLAB® functions
Also, you can create an annotation that can hold only an image.
To create a text annotation, use one of these options:
Double-click the canvas where you want to create the annotation.
Click the annotation box on the palette and then click the canvas.
Drag the annotation box to the canvas.
After you add the text annotation, you can:
Apply formatting changes to text or insert an image or a table using the formatting toolbar.
Apply additional formatting, using the Paragraph menu on the context menu. For example, you can create bullet and numbered lists from this menu.
Add hyperlinks using the context menu. You can use hyperlinks to open a website or make an annotation interactive using MATLAB commands.
Apply properties using the Property Inspector. To view the Property Inspector, select View > Property Inspector.
An annotation resizes as you enter content. You can also resize an annotation by dragging the corners. For example, you can hold Shift as you drag to resize proportionally.
After you resize an annotation, the annotation stays that size until you resize it again, regardless of the content size. To revert to the original height or width of the annotation, in the Property Inspector, under Appearance, clear the Fixed height or Fixed width check box.
To make the annotation interactive, use a hyperlink on any content of a text annotation.
In the annotation, select the content that you want to make interactive. To make the entire annotation interactive, select all the content.
Right-click and select Hyperlink from the context menu.
In the Hyperlink dialog box, either:
Select URL Address as the target and enter the web address in the Code box.
Select MATLAB Code as the target and enter MATLAB functions in the Code box.
For an alternative approach, see Add an Annotation Callback
You can add an annotation that contains only an image. Add an image annotation when you want to be able to resize or move the image independently of text. For example, you can put your company logo in an image and size and position it at a particular location in the model. You can also associate MATLAB functions with a click on the image.
Tip: To include an image such as a logo in every new model, add the image to your default template. See Create a Template from a Model.
From the Simulink Editor palette, drag an Image box into the model.
Add an image to the box. You can either:
Double-click the image box and browse to an image.
Paste an image from the clipboard. Right-click the image box and select Paste Image.
Tip: If you resize the image, you can reset it to its original size. Right-click the image and select Format > Restore Size.
To associate an action with an image:
Select the image.
In the Property Inspector, under ClickFcn, add the MATLAB functions that you want to invoke with a click on the image.
You can add TeX formatting commands to your annotation for mathematical and other symbols and Greek letters. For the supported TeX commands, see TeX for Simulink Model Annotations
Add supported TeX commands to your annotation. For example, add this text:
\sigma \kappa \mu
With the annotation selected, or with the text cursor in the annotation, in the Property Inspector, under Appearance, select Enable TeX commands.
When you click outside the annotation, the TeX commands appear as symbols in the annotation.
You can add connector lines between an annotation and a block in the model. The connector is similar to a callout, identifying the block that an annotation applies to. If you move the annotation or block, the connector moves or resizes to keep the connection.
Place the cursor over the annotation outline where you want the connector to start.
When the cursor is a cross hair, drag the connector line to the block you want to connect to.
Tip: To specify the color or width of the connector, right-click it and use the Format menu.
On Linux® machines configured for English, the Font
style list in the Select Font dialog box can appear out
of order and in another language in some fonts. If the characters
in your Font style list appear in another language,
LANG environment variable to
you start MATLAB. For example, at a Linux terminal, enter:
setenv LANG en_US.utf-8 matlab