-
Notifications
You must be signed in to change notification settings - Fork 2
/
fp_eval_pac_sim.m
47 lines (35 loc) · 1.43 KB
/
fp_eval_pac_sim.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
32
33
34
35
36
37
38
39
40
41
42
43
44
function fp_eval_pac_sim(ip,seed,iit)
% Calls fpp_pac_sim in structured way
%
% Copyright (c) 2023 Franziska Pellegrini and Stefan Haufe
rng('default')
rng(seed)
%define parameters for the current experiment
params1 = fp_get_params_pac(ip);
params = params1;
for isnr = params1.isnr %signal-to-noise ratio
params.isnr = isnr;
for iInt = params1.iInt %number of interactions
if params.case<3
params.iInt = iInt;
else
params.iInt = params1.iInt;
end
%create logfile for parallelization
if params.case == 1
logname = sprintf('univar_iInt%d_iReg%d_snr0%d_iss0%d_filt%s_pip%d_iter%d'...
,params.iInt,params.iReg,params.isnr*10,params.iss*10,params.ifilt,params.t,iit);
elseif params.case == 2
logname = sprintf('bivar_iInt%d_iReg%d_snr0%d_iss0%d_filt%s_pip%d_iter%d'...
,params.iInt,params.iReg,params.isnr*10,params.iss*10,params.ifilt,params.t,iit);
elseif params.case == 3
logname = sprintf('mixed_iInt%d%d_iReg%d_snr0%d_iss0%d_filt%s_pip%d_iter%d'...
,params.iInt(1),params.iInt(2),params.iReg,params.isnr*10,params.iss*10,params.ifilt,params.t,iit);
end
fprintf('Working on %s. \n',logname)
params.iit = iit;
params.ip = ip;
params.logname = logname;
fp_pac_sim(params)
end
end