Why does ModelAdvisor.Paragraph() not display texts within "<>"?
조회 수: 9 (최근 30일)
이전 댓글 표시
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
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 %<custom text!!!!!!>");
Please note that, instead of putting "<" and ">", we replace them with "<" and ">".
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!