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 次查看(过去 30 天)
显示 更早的评论
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.
采纳的回答
MathWorks Support Team
2009-6-27
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Search Path 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!