Why does ModelAdvisor.Paragraph() not display texts within "<>"?

8 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2022 年 9 月 28 日
回答済み: MathWorks Support Team 2022 年 11 月 14 日
I am authoring a custom check and adding custom text/instructions to the results using ModelAdvisor.Paragraph using the following syntax:
t3 = ModelAdvisor.Paragraph("I added my %<custom text!!!!!!>");
However, the displayed text in the results window ignores characters inside the '<>' as seen below. Why does "ModelAdvisor.Paragraph" ignore text inside '<>'? Is there a workaround for this problem?
Text displayed in the Model Advisor results Window:
"I added my %"

採用された回答

MathWorks Support Team
MathWorks Support Team 2022 年 9 月 28 日
The reason "ModelAdvisor.Paragraph" ignores the texts in between "<>" is that "ModelAdvisor.Paragraph" generates HTML content for a report. Based on the HTML syntax, anything inside "<>" will be treated as a tag and not rendered. Therefore, in order to print out the symbol and texts in between, escape codes should be used. 
ModelAdvisor.Paragraph can be used with escape codes as follows:
t3 = ModelAdvisor.Paragraph("I added my %&lt;custom text!!!!!!&gt;");
Please note that, instead of putting "<" and ">", we replace them with "&lt;" and "&gt;". 

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by