Main Content

setItalic

Set text as italicized style in Model Advisor analysis results

Description

setItalic(textObj,italicizeText) sets the text in textObj to italic if italicizeText is true and removes italic formatting if italicizeText is false.

Note

The setItalic function formats 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.

example

Examples

collapse all

Create a Model Advisor text object with a message.

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

Make the text italicized.

setItalic(result,true);

You can also use this approach in a check callback function. 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

Input Arguments

collapse all

Text for the Model Advisor output, returned as a ModelAdvisor.Text object.

Italic text setting, specified as a numeric or logical 1 (true) or 0 (false). If italicizeText is 1, then the text from textObj is displayed in italics. If italicizeText is 0, then the text is plain.

Data Types: logical

Version History

Introduced in R2007b