Mercurial > repos > public > matlab_path_manager
comparison +mpm/clear.m @ 3:ce34182c274e
Add state
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 10 Sep 2018 15:19:55 +0200 |
parents | |
children | 02c290e2018c |
comparison
equal
deleted
inserted
replaced
2:a9795512f33a | 3:ce34182c274e |
---|---|
1 % Remove all loaded subpaths from the matlab path | |
2 function clear() | |
3 state = mpm.load_state(); | |
4 | |
5 subpaths = state.added_paths.keys(); | |
6 | |
7 for i = 1:length(subpaths) | |
8 rmpath(subpaths{i}); | |
9 state.added_paths.remove(subpaths{i}); | |
10 end | |
11 | |
12 mpm.save_state(state); | |
13 end |