Main Content

setBold

Specify bold text in Model Advisor analysis results

    Description

    example

    setBold(textObj,boldText) makes textObj bold if boldText is true and makes textObj not bold if boldText is false.

    Note

    The function setBold is for formatting 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 bold.

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

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

    Make the text bold.

    setBold(result, true);

    Use setBold in a check callback function in your sl_customization file to format your results.

    function result = SampleStyleOneCallback(system)
    result = ModelAdvisor.Text('This is a message in bold.');
    setBold(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 Display and Enable Check.

    Input Arguments

    collapse all

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

    Bold text setting, specified as a numeric or logical 1 (true) or 0 (false). If boldText is 1, the textObj is formatted bold. If boldText is 0, the textObj is not formatted bold.

    Data Types: logical