Include sub-folders automatically in script
2 次查看(过去 30 天)
显示 更早的评论
Hello, I would like to know if there is a command by which I can include subfolders in my working path? ex: I have a folder structure which looks like x(main folder)-- a, b, c and d (sub-folders).Everytime I have to incluse all these folders I have to write [workpath, filesep, 'x'];... [workpath, filesep, 'x', filesep, 'a'];... and so on. All I need now is to reduce these extra lines and have just one line which will include all paths. Thank you.
0 个评论
采纳的回答
Robert Cumming
2012-8-30
I'm not 100% sure what your after - but have you seen
help genpath
e.g.
addpath ( genpath ( pwd ) )
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!