Why does using the function GENPATH on a folder that contains packages such as "+PackageFolder" produce string that causes a warning when used with the function ADDPATH?
10 views (last 30 days)
Show older comments
I have generated a string using GENPATH. Since it also adds the package folders to the string, this causes the ADDPATH function to show the following warning:
Warning: Package directories not allowed in MATLAB path:
C:\Temp\Test\+PackageFolder.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
The ability for the function GENPATH to ignore package folders as it does with class (@ClassFolder) and private folders is not available in MATLAB R2008a.
If the string that is generated by GENPATH contains package folders, a warning will be shown if the string is used as the argument for the function ADDPATH.
No workaround is needed since ADDPATH will ignore the package folder. All preceding and subsequent folders in the string will be added to the path normally.
0 Comments
More Answers (0)
See Also
Categories
Find more on Search Path in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!