Mercurial > repos > public > matlab_path_manager
diff +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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/+mpm/clear.m Mon Sep 10 15:19:55 2018 +0200 @@ -0,0 +1,13 @@ +% Remove all loaded subpaths from the matlab path +function clear() + state = mpm.load_state(); + + subpaths = state.added_paths.keys(); + + for i = 1:length(subpaths) + rmpath(subpaths{i}); + state.added_paths.remove(subpaths{i}); + end + + mpm.save_state(state); +end