-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.m
31 lines (27 loc) · 1.19 KB
/
config.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% ©2024 ETH Zurich; D-MAVT; Engineering Design and Computing
%% Setting up environment for edacFEM
% set configmode to 'permanent' to permanently set the path variables
% set configmode to 'temp' to set the path for this MATLAB instance only
% set configmode to 'pass' to do no config
if ~exist('configmode','var')
% if the script is called without first setting the configmode - which
% can happen when it is used as standalone, e.g. right after
% installation or when called in an FE-script without first setting
% configmode - the configmode temp is chosen.
configmode='permanent';
end
switch configmode
case 'permanent'
thisFilePath=mfilename('fullpath'); % retrieve current file path
[thisPath,~,~]=fileparts(thisFilePath); % folder path
addpath(genpath(thisPath)); % add paths
savepath % save path
clear thisFilePath thisPath % delete variables
case 'temp'
thisFilePath=mfilename('fullpath'); % retrieve current file path
[thisPath,~,~]=fileparts(thisFilePath); % folder path
addpath(genpath(thisPath)); % add paths
clear thisFilePath thisPath % delete variables
case 'pass'
% do nothing
end