主要内容

本页采用了机器翻译。点击此处可查看英文原文。

setCheckText

在模型顾问分析结果中添加检查的描述

说明

setCheckText(ftObj,text) 是一个可选方法,用于在由格式化模板对象 ftObj 生成的报告开头插入描述性内容。使用此方法可以添加解释性文本或模型顾问模板对象,以总结或描述整体检查。

示例

示例

全部折叠

此示例展示了如何在模型顾问结果的开头添加摘要描述。

Create a formatting template object.

ft = ModelAdvisor.FormatTemplate("TableTemplate");

Add descriptive text at the beginning of the report.

setCheckText(ft,"This table lists all blocks in the model 'vdp'.");

Set the table title and column titles.

setTableTitle(ft,{"Blocks in Model"});
setColTitles(ft,{"Index","Block Name"});

Open the model and find all blocks.

openExample("vdp")
allBlocks = find_system("vdp");

Add each block to the table.

for idx = 2:length(allBlocks)
    addRow(ft,{idx-1, allBlocks(idx)});
end

输入参数

全部折叠

ModelAdvisor.FormatTemplate 对象,指定为格式化模板的句柄。

报告开头要显示的信息。请将其指定为包含描述性文本的字符向量或字符串标量。

示例: ["Identify unconnected lines","Item 2"]

版本历史记录

在 R2009a 中推出