Main Content

Referencing Projects from Another Project

This example shows how to use referenced projects as independent components within your project.

Setting Up the Example Files and Opening the Project

Create and open a working copy of the project example files. MATLAB® copies the files to an example folder so that you can edit them.


How Referenced Projects Work

When the parent project is loaded, the referenced projects are loaded first, to add project paths from the referenced project to the MATLAB search path, and to run startup shortcuts from the referenced projects.

  • You can run the shortcuts in referenced projects from the parent project, using the Project Shortcuts tab.

  • You can examine and open referenced projects by clicking the References node in the Views pane.

Example Referenced Projects

This project provides an airframe simulation which brings in functionality from these other projects by referencing them:

  • Signal Multiplier: This referenced project shows how to develop an S-function as an independent project. The referenced project provides source code, build support and path management. The build directory is on the project path, so it is also on the path for the parent project. You can run the "rebuild s-function" shortcut from the parent project on the Project Shortcuts tab.

  • Wind Gust library: This referenced project provides a library and a data dictionary that contains the required bus objects for the library. This project's path ensures that the library is set up for use in the parent project.

Further Information

Componentization of Large Projects