This project serves as an example for dependency management in MATLAB. It uses PackMan (which is based on DepMat by Tom Doel, https://github.com/tomdoel/depmat) to fetch packages from git (e.g. from github).
To start a new project that depends on other repos, you can:
- Clone of this repo to use it as the starting point for your project by running:
>> !git clone https://github.com/OmidS/PackManSample.git MyProject
- Go into the project directory:
>> cd MyProject
-
Modify getDepList.m to reflect your list of dependencies.
-
Any time you want to install or update the dependencies, call installDeps:
>> installDeps
-
If you need to add more dependencies, repeat 3 and 4.
-
Before running your code (e.g. in a main.m script), to add dependencies to the MATLAB path, use the Package Manager object as follows:
>> pm = installDeps;
>> addpath(pm.genPath());