-
Olivier Sauter authored
git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@11352 d63d8f72-b253-0410-a779-e742ad2e26cf
Olivier Sauter authoredgit-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@11352 d63d8f72-b253-0410-a779-e742ad2e26cf
gdatpaths.m 568 B
function gdatpaths(remove)
%
% add paths for gdat directory
%
% assumes gdat already available
%
if nargin < 1
remove = false;
end
a=which('gdat');
if isempty(a), error('gdat is not in the MATLAB path'); end
a = fileparts(a);
% machines=[{'JET'} {'TCV'} {'AUG'} {'D3D'}];
% machines=[{'JET'} {'TCV'} {'AUG'} {'KSTAR'}];
machines=[{'JET'} {'TCV'} {'AUG'} {'D3D'} {'KSTAR'} {'TCV_IMAS'}];
add_paths = cell(1,length(machines));
for i=1:length(machines)
add_paths{i}=fullfile(a,machines{i});
end
if ~remove
addpath(add_paths{:});
else
rmpath(add_paths{:});
end