generate model advisor reports -凯发k8网页登录

main content

generate model advisor reports

by default, when the model advisor runs checks, it generates an html report of check results in the slprj/modeladvisor/model_name folder. additionally, if you have a matlab® report generator™ license, on windows® platforms, you can generate model advisor reports in adobe® pdf, and microsoft® word .docx formats.

the beginning of the model advisor reports contain the:

  • model name

  • simulink® version

  • system

  • treat as referenced model

  • model version

  • current run

generate results report after executing model advisor checks

to generate a model advisor report in adobe pdf or microsoft word:

  1. in the left pane of the model advisor, select the checks you want to run. click on the folder that contains the checks and, from the toolstrip, click run checks.

  2. when complete, from the toolstrip, click report.

  3. in the save report dialog box:

    • enter the path to the folder where you want to generate the report.

    • provide a file name.

    • click save to generate a report in html format.

  4. use can change the file format to pdf, or word using the drop-down options of the report button.

  5. the model advisor generates the report and saves it to the designated location.

modify template for model advisor check results report

if you have a matlab report generator license, you can modify the default template that the model advisor uses to generate the report in pdf or microsoft word.

the default template contains fields that the model advisor uses to populate the generated report with information about the analysis. if you want your model advisor report to contain the analysis information, do not delete the fields. when the model advisor generate the report, analysis information overrides the text that you enter in the template field.

template fieldin generated report, displays
modelnamemodel name
simulinkversionsimulink version
systemnamesystem name
treatasmdlrefwhether or not model is treated as a referenced model
modelversionmodel version
currentrunmodel advisor analysis time stamp
passcountnumber of checks that pass
justifiedcountnumber of checks that are justified
incompletecountnumber of checks that fail to run to completion
failcountnumber of checks that fail
warningcountnumber of checks that cause a warning
nruncountnumber of checks that did not run
totalcounttotal number of checks
checkresultsresults for each check

this example shows how to add a header to a pdf version of a model advisor report.

  1. using microsoft word, open the default template matlabroot/toolbox/simulink/simulink/modeladvisor/resources/templates/default.dotx.

  2. rename and save the template default.dotx to a writable location. for example, save template default.dotx to c:/work/ma_format/mytemplate.dotx.

  3. in the template c:/work/ma_format/mytemplate.dotx file, add a header. for example, in the template header, add the text my custom header. save the template as a microsoft word .dotx file.

    model advisor report template with the custom header

  4. from the model advisor toolstrip, click report drop-down, and select template file.

  5. in the select template for report dialog box, enter the path to the folder where your custom template is placed. in this case, the path is c:/work/ma_format/mytemplate.dotx.

  6. click ok.

  7. from the toolstrip, click report drop-down, and select pdf. the model advisor generates the report in pdf format with the custom header.

    model advisor report in pdf format with the custom header

see also

|

related topics

网站地图