You can associate a report with your model. By associating a report with a model, you can use a script to generate the report without specifying the name of the report. You can change the association without modifying the script.
Associating a report with a model sets the model parameter
to the name of the report. Each model can have only one report associated with it. You can
associate the same report with more than one model.
Open the model you want to associate with a report.
In the Report Explorer, from the hierarchy view, select Report Generator. The library pane lists your reports.
Select the report you want to associate with your model.
In the properties pane, under Simulink, click Associate report with Simulink system. The report and model names are part of the button label.
Save the model.
Create a script to generate the report using
sure the model and report template are on the MATLAB® path when you run the
load_system('myModel') report(get_param('myModel','ReportName')) bdclose('myModel')
You can clear the association clicking Un-associate Simulink system.