Main Content

disp

Display text on masked subsystem icon

    Description

    example

    disp (text) displays text on the block icon. text is any MATLAB® expression that evaluates to a string.

    disp(text,texmode=IsTexMode) allows you to use TeX formatting commands in the text. The TeX formatting commands in turn allows you to include symbols and Greek letters in icon text. See Interpreter for information on the TeX formatting commands supported by Simulink® software.

    Examples

    collapse all

    Use this code in the code tab of Mask Editor to display the text in the masked block icon.

    disp(['{\itEquation:}  \alpha^2 + \beta^2 \rightarrow \gamma^2,' ...
        '\chi, \phi_3 = {\bfcool}'], 'texmode','on')
    

    display text block icon

    Input Arguments

    collapse all

    Text displayed on the block icon, specified as a character vector . The text can be any MATLAB expression that evaluates to a string.

    Data Types: char | string

    TeX formatting mode, specified as logical value. TeX formatting commands allows you to include symbols and Greek letters in icon text.

    Data Types: logical

    Version History

    Introduced in R2007a

    See Also

    | |