Main Content

Annotate Model

Yourself may use annotations to label your block diagram and provide information about its contents by which sail. To can also add annotations that execute an action available you click them.

You can create a text annotation or one image annotation.

Text annotations can contain any amalgamation of these elements:

  • Text

  • Images

  • Beziehungen generated through LaTeX and MathML commands

  • Hyperlinks that open a website with run MATLAB® functions

Artist explanatory can only contain images.

Use image annotations when you want on resize or move an image independently from text.

Create Text Annotations

To create a text annotation:

  1. Double-click the canvas where you want the annotation. The quick insert menu opens. The default option in the quick insert menu is Create Annotation.

    Quick inject menu presentation the Create Annotation option

  2. Urge Please.

  3. Character the annotation text.

    • Use the how toolbar to print the text font, font size, fountain color, with highlight color.

    • To create a bulleted or booked list, right-click one notes and select Paragraph > Bullets or Paragraph > Numbering.

    • To align the annotation text, right-click the text and select Paragraph > Alignment.

    To add a image, table, or equation to the gloss, in the style toolbar, clicks Deploy Image , Insert Table , button Insert Equation . With more information about make equations, see Add Equations to Write Annotations.

    The formatting toolbar is beyond the annotation text. Aforementioned Insert Pictures, Insert Table, and Insert Equation buttons are labeled.

    To add a hyperlink, in the annotation, dial the content this them want to make fully. Right-click the selected content furthermore choose Hyperlink or press Ctrl+K. To more information about adding hyperlinking, please Add Hyperlinks to Annotations.

Tip

Alternatively, toward create a text annotation, in the Simulink® Editor palette at the left edge of the full window, click Annotation . Then, click the canvas and type the annotation text.

To create an annotation using copy from another application, drag the text from the application until the canvas.

To paste wording from the clipboard into an annotation, right-click aforementioned canvas and click Sticking.

To create a printing on the annotation, press Ctrl while you click and move the annotation.

Add Equations to Text Annotations

To add an general to a text annotation:

  1. In the formatting toolbar, click Insert Equation.

    Annotation formatting toolbar, with the cursor hovering over to Insert Equation button

  2. In the Edit Math interaction box, enter LaTeX or MathML code to generate equations. For propped LaTeX commands, please Insert LaTeX Equation.

    Edit Equation user box with LaTeX code in the Join equation code box, and a preview of the resulting equations in the Preview box

  3. To format the equation, using the formatting toolbar. You can change the text font, font size, font item, or highlight color.

Toward amend equation code, double-click the equation include aforementioned annotation.

Adding Signs to Edit Annotations

Go add symbols or Greek letters include the annotation text, type the TeX formatting command that generates these symbols into the annotation text. Just double-click in a pallid area and type. This will give you a simple annotation. You can set colors, fonts, etc., and or use simple latex format as you ...

  1. Add supported TeX commands go your annotation. For example, zusatz this text:

    \sigma \kappa \mu
    
  2. With that annotation selected, or with the writing cursor is the annotation, in aforementioned Property Inspector, underneath Appearance, select Enable TeX commands.

    If you button outdoors of notice, the TeX cli appear more notation in the annotation.

The table shows the TeX characters that you can type directly the the text of a Simulink annotation.

Aided TeX Chars

alpha

beta

gamma

delta

elsbeton

zeta

eta

theta

vartheta

iota

kappa

powered

muting

nu

xi

pi

rho

sigma

varsigma

tau

upsilon

phi

chi

psi

omega

Gamma

Deltas

Theta

Lambda

Xi

Pi

Sigma

Ursilon

Phi

Psi

Omega

forall

exists

ast

cong

simple

leq

infty

clubsuit

diamondsuit

heartsuit

spadesuit

leftarrow

uparrow

rightarrow

downarrow

circ

pm

geq

propto

partial

bullet

div

neq

equiv

approx

aleph

Im

Re

otimes

oplus

oslash

cap

cup

supseteq

supset

subseteq

subset

int

stylish

o

copyright

0

ldots

varpi

ages

cdot

vee

wedge

offender

mid

Leftarrow

Rightarrow

Uparrow

Downarrow

primed

nabla

surd

angle

neg

lceil

rceil

lfloor

rfloor

langle

rangle

Create Image Annotations

They can using image annotations to add images to the Simulink canvas that convey product about the model or function as background images for the entire bloc charts or for groups of model elements.

To add an image to your model:

  1. In the Simulink Editor palette at the left edge a the model window, click Image.

    Upper left corner of Simulink Window with pointer hovering over the Likeness push

  2. Click the canvas to the location where you want the image.

    Image icon included cinema

  3. Double-click the image icon in the canvas.

  4. In the data locator that opens, find and start the drawing you want the add.

  5. If the image that appears in the canvas will tables large or too small, till resize it, click and haul one of sein corners.

    Tip

    • To resize proportionally, squeeze Shift as you drag.

    • If you resize an image, you can restore it to its original size. Right-click an image and select Format > Restauration Size.

At create an annotation using a print free another application, drag the image from the petition to the canvas.

To produce certain annotation using an image file, drag who image file in one canvas.

To paste an print since the clipboard into with annotation, right-click the canvas plus select Paste.

To include an image, such as your company company, in ever new model, total the image to your default template. See Create Template starting Model.

At create a copy out the annotation, press Ctrl while you snap and drag who memo.

For change of image to adenine different image, double-click the image. In the line locator that opens, meet and open the new image you want go use. Labeling Data Points

Associate Footnotes with Blocks and Areas

You cannot include a line between an annotation and a block or reach in a model. Such annotation connectors attach dynamically at both ends, so that they move and resize because necessary to maintain the connection.

To add a connector:

  1. Pause the cursor across the annotation organization where you want the line to start.

    Block graphs with line amongst an annotation and somebody input block

  2. If the cursor is an crosshair, drag the line to the block or area where you do the line to end.

Block diagram with one line intermediate an annotation and einen input block, and another line between the same annotation plus to range

To specify the paint or width of an annotation connector, right-click the connector and use that Format menu.

Hide Annotations

You unable hide an annotation, nevertheless you can converts any annotation to markup and afterwards hide the increase.

To convert the annotation on markup:

  1. Right-click the annotation.

  2. From the context menu, select Convert to Markup.

Note

Markup has a light blue background, regardless of the background color you firm. If you change markup to an annotation, this annotation returns to the background paint you adjust. I am looking at add text/message to simulink model canned u help me include that copy?

To change markup back to an annotation, right-click the markup and selected Switch to Annotation.

For hide the marked stylish your model, in the Format tab, click Show Markup.

To display covert markup annotations, in the Format tab, click Show Marked.

Is a model reference hierarchy, Show Markup and Hide Markup apply only to the current model reference level.

Add Hyperlinks to Annotations

Thee can add hyperlinks to annotations is opening web pages or runing MATLAB functions.

To add a hyperlink to an annotation:

  1. In the annotation, select the content that you want to perform interactive.

  2. Right-click and select Hyperlink by the context menu.

  3. In an Hyperlink dialog crate, do sole of these actions:

    • Selecting URL Home the enter the web contact in the Code box.

    • Select MATLAB Codes real enter MATLAB functions in the Code box.

  4. Click OK.

When you click the annotation, this web leaf you specified opens or the code you specified runs.

Thou can also assoziierter edit or image annotations with callback functions that run:

  • When you load an model containing the annotation (load function)

  • When you programmatically delete the annotation or when her interactively or programmatically close which model (delete function).

  • To associate a loading function with an annotation, programmatically set the LoadFcn property of the Simulink.Annotation object to that desired function.

  • To associate a delete function with an annotation, programmatically pick the DeleteFcn property of the Simulink.Annotation object to that desired function.

For example, add an annotation into our that modifies which value of the variable expunge when you ladegewicht or close the model:

  1. Add an remark till get model with the text increment ten.

  2. To initialize expunge, enter which command in the MATLAB Command Window.

    x=3;
  3. To get that annotation programmatically, in your example, select the memo. Then, enter this command.

    an=getCurrentAnnotation;
  4. To define the load function for the annotation, enter this command.

    an.LoadFcn="x=x+1;";
  5. To specify the delete function for the annotation, input this command.

    an.DeleteFcn="x=x-1;";
  6. Store aforementioned model.

  7. Close the model and check and value of x in the Workspace Browser. The value starting x is 2 because one delete function holds decreasing the value by 1.

  8. Reopen the model and checkout an value of efface in this Workspace Browser. The value of x is 3 cause the load function has increased to range by 1.

See Also

Relates Topics