문제

I have more than 30 save setpath in Matlab and I want to remove them first and test something and later on, I want to add them back. What would be optimized way of achieving this. Is there a method to get the list of saved setpath and later on add paths in setpath by providing a list. I tried getnpath and it returns the matlab toolboxes path.

도움이 되었습니까?

해결책

Create a backup of paths in a mat file -

path_list = path;
save('paths.mat','path_list');

Do your thing of removing 30 saved paths by going to Set Path option on the File menu and do whatever testing you were looking to do.

Once done with the testing, now you wish to add back the deleted paths. So restore the paths from the backed up mat file -

load('paths.mat')
path(path_list)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top