Using a MATLAB project is an elegant approach for organizing work. A project can be created from a folder using the "From Folder" option.
In the subsequent steps, the wizard allows configuration of folders to be added to the path when the project opens and removed when it closes. The project also supports startup and shutdown scripts.
Create a project with all the files to be shared, and add all the necessary folders to the path using the wizard. This setup allows specifying just the input file name instead of the full path as shown below.
Alternatively, the PRE-LOAD callback can be used for each test case.
To access the documentation for MATLAB projects, use the following command:
web(fullfile(docroot, 'matlab/projects.html'))