34 lines
895 B
Matlab
34 lines
895 B
Matlab
function [] = initializeLoggingConfiguration(args)
|
|
|
|
arguments
|
|
args.log char {mustBeMember(args.log,{'none', 'all', 'forces'})} = 'none'
|
|
args.Ts (1,1) double {mustBeNumeric, mustBePositive} = 1e-3
|
|
end
|
|
|
|
conf_log = struct();
|
|
|
|
switch args.log
|
|
case 'none'
|
|
conf_log.type = 0;
|
|
case 'all'
|
|
conf_log.type = 1;
|
|
case 'forces'
|
|
conf_log.type = 2;
|
|
end
|
|
|
|
conf_log.Ts = args.Ts;
|
|
|
|
if exist('./mat', 'dir')
|
|
if exist('./mat/nass_model_conf_log.mat', 'file')
|
|
save('mat/nass_model_conf_log.mat', 'conf_log', '-append');
|
|
else
|
|
save('mat/nass_model_conf_log.mat', 'conf_log');
|
|
end
|
|
elseif exist('./matlab', 'dir')
|
|
if exist('./matlab/mat/nass_model_conf_log.mat', 'file')
|
|
save('matlab/mat/nass_model_conf_log.mat', 'conf_log', '-append');
|
|
else
|
|
save('matlab/mat/nass_model_conf_log.mat', 'conf_log');
|
|
end
|
|
end
|