Set Up File Management System
As a model grows, managing referenced files and dependencies becomes more complicated. To reduce the complexity of managing large models, you can use projects. Projects in Simulink® help to organize large model hierarchies by finding required files, managing and sharing files and settings, and interacting with source control.
Open the project named BasicModelingProject
, which contains these files:
Subsystem file
BasicModelingPlant.slx
Model file
BasicModelingHierarchy.slx
Model file
BasicModelingController.slx
Model file
BasicModelingOperatorVariant.slx
Script
BasicModelingDataPlant.m
Script
BasicModelingDataController.m
Script
BasicModelingVariantChoice.m
Function
BasicModelingBusObjects.m
To group the files by type in a project, add the Type column by right-clicking a column header and selecting Type. Then, click the Type column header.
The MATLAB® scripts, function, and top model are configured to Run at Startup.
The top model in the model hierarchy has a project shortcut. To reopen the top model if you close it, on the Project Shortcuts tab, click Open Top Model.
Using this project, you can explore these project capabilities:
Automate tasks
Create shortcuts for common actions
Analyze file dependencies
Analyze the impact of changing files
Compare model files
In the Views pane of the project, select Dependency Analyzer. To run a dependency analysis on all the files in the project, click Analyze.
A dependency graph opens. To update the graph, in the Dependency Analyzer toolstrip, click Analyze.
In the dependency graph, click a dependency arrow to display its properties, including the dependency type, in the Properties pane. In this example, the scripts and functions are run by callbacks. Since these files run at startup in the project, the callbacks are redundant and can be removed.
The dependency graph also shows the two-level model hierarchy, in which the top model depends on a referenced subsystem and referenced models.
See Also
Dependency Analyzer | Comparison Tool