How do I avoid the error "Project paths must be in the project root folder." when trying to add a folder to the Matlab path?
18 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to create in project in for example the folder /Documents/src/App. I then try to add the folder Documents/src/lib to the Matlab path for the project.
I get the error "Project paths must be in the project root folder."
If I instead create the project in the folder Documents/src, it adds all of the dozens of files in Documents/src/lib to the project, which seems to defeat the purpose of having a project and path.
I don't see any way to change to Project Root after the project is created.
How can I work around this? Or is there a preferred directory structure for Matlab projects that avoids this?
0 commentaires
Réponses (1)
Sahithi Kanumarlapudi
le 20 Avr 2020
Hi,
As the error message says MATLAB allows you to add only the subfolders of the folder in which you have created the project. But you can select the specific sub folders which you want to add to the project path. In your case you can create the project at "Documents/src" and you can add the specific sub folder to your path.
For more information on how to add path to a project refer to the following links
Hope this helps!
2 commentaires
Stephen Nawrocki
le 6 Jan 2021
This will not work for me. We have specific tools located elsewhere on the machine. I need a way to add folders that are not below the project.
Michael Stellpflug
le 2 Déc 2025 à 22:15
Stephen, you are not crazy, I would also greatly enjoy "references" to places other than myself, but I still get this error in 2025a.
Voir également
Catégories
En savoir plus sur Search Path dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!