Set Up a 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.
ex_modeling_project_setup.m creates a project that contains these files:
Run the script to create the project.
The MATLAB scripts and function are configured to Run at Startup.
Using this project, you can explore project capabilities, such as these capabilities:
Create shortcuts for common actions
Analyze file dependencies
Analyze the impact of changing files
Compare model files
In the Project Views, select Dependency Analyzer and click Analyze to run a dependency analysis on all the files in your project. In the dependency graph, hover over the dependency arrows to find the dependency type. It shows that the MATLAB scripts and functions are being run by model callbacks.
Since these files now run at startup, the model 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 library and referenced model.