Skip to content
Snippets Groups Projects
Commit a5b46cd9 authored by Antoine Merle's avatar Antoine Merle
Browse files

Add possibility to remove gdat paths.

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@10451 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 2238fd5b
No related branches found
No related tags found
No related merge requests found
function gdatpaths function gdatpaths(remove)
% %
% add paths for gdat directory % add paths for gdat directory
% %
% assumes gdat already available % assumes gdat already available
% %
if nargin < 1
remove = false;
end
a=which('gdat'); a=which('gdat');
if isempty(a), error('gdat is not in the MATLAB path'); end if isempty(a), error('gdat is not in the MATLAB path'); end
a = fileparts(a); a = fileparts(a);
machines=[{'JET'} {'TCV'} {'AUG'} {'D3D'}]; % machines=[{'JET'} {'TCV'} {'AUG'} {'D3D'}];
machines=[{'JET'} {'TCV'} {'AUG'} {'KSTAR'}]; % machines=[{'JET'} {'TCV'} {'AUG'} {'KSTAR'}];
machines=[{'JET'} {'TCV'} {'AUG'} {'D3D'} {'KSTAR'}]; machines=[{'JET'} {'TCV'} {'AUG'} {'D3D'} {'KSTAR'}];
add_paths = cell(1,length(machines)); add_paths = cell(1,length(machines));
for i=1:length(machines) for i=1:length(machines)
add_paths{i}=fullfile(a,machines{i}); add_paths{i}=fullfile(a,machines{i});
end end
addpath(add_paths{:}); if ~remove
addpath(add_paths{:});
else
rmpath(add_paths{:});
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment