How do i remove a path with sub folder similar to how we add folder with all sub folder? Matlab takes very long to initialize.
조회 수: 164 (최근 30일)
이전 댓글 표시
I am trying to run matlab and I recently added a lot of paths for my work. As of now Matlab takes too long to initialize. I am trying to remove all the paths and we have add path with subfolder but not an option to remove path with subfolders. Is there any way I can remove it? I have tried rmdir, rmpath (C:\..) but nothing seems to remove subfolder paths. Thank you for your time.
Regards Raj
댓글 수: 0
채택된 답변
Image Analyst
2018년 6월 7일
Try genpath
rmpath(genpath(topLevelFolder));
댓글 수: 2
OCDER
2018년 6월 7일
And just in case there are subdir not in the matlab path, which generates warning messages, suppress warnings:
warning('off','all');
rmpath(genpath(topLevelFolder));
warning('on','all');
Image Analyst
2018년 6월 7일
Or more specifically
warning('off', 'MATLAB:rmpath:DirNotFound');
추가 답변 (2개)
Jan
2023년 2월 9일
Go to Home --> Set Path --> Remove folders in the window or press default as suggested by Kishan.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1290810/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1290810/image.png)
댓글 수: 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!