Main Content

setItalic

Specify italic text in Model Advisor analysis results

    Description

    example

    setItalic(textObj,italicizeText) makes textObj italicized if italicizeText is true and makes textObj not italicized if italicizeText is false.

    Note

    The function setItalic is for formatting text in Model Advisor analysis results with Simulink® Check™. For more information, see Simulink Check.

    For information on how to format text in MATLAB®, see Formatting Text.

    Examples

    collapse all

    Create a Model Advisor text object and make the text italicized.

    Use ModelAdvisor.Text to create Model Advisor text object t1.

    result = ModelAdvisor.Text('This is a message in italics.');
    

    Make the text italicized.

    setItalic(result, true);

    Use setItalic in a check callback function in your sl_customization file to format your Model Advisor analysis results.

    function result = SampleStyleOneCallback(system)
    result = ModelAdvisor.Text('This is a message in italics.');
    setItalic(result, true);
    end

    For more information on using check callback functions to format text, see Specify Text in the Model Advisor Output. For more information on how to format check results, see Define Custom Model Advisor Checks.

    Input Arguments

    collapse all

    Model Advisor result text, specified as a ModelAdvisor.Text object.

    Italic text setting, specified as a numeric or logical 1 (true) or 0 (false). If italicizeText is 1, the textObj is italicized. If italicizeText is 0, the textObj is not italicized.

    Data Types: logical