1
- function testTimeseries(system , outfolder )
2
- % Generate time series for the main analysis; this should only take a few
3
- % minutes, and will produce an `inputs.mat` file, a `results` folder and 100
4
- % `time_series_data` subfolders (each with a `timeseries.mat` file and an `inputs_out.mat` file)
1
+ function testTimeseries(system , outfolder , save_cp_split )
2
+ % Generate time series for the main analysis; this should only take a few
3
+ % minutes, and will produce an `inputs.mat` file, a `results` folder and 100
4
+ % `time_series_data` subfolders (each with a `timeseries.mat` file and an `inputs_out.mat` file)
5
+ if nargin < 3 || isempty(save_cp_split )
6
+ save_cp_split = 100 ;
7
+ end
8
+
5
9
switch system
6
10
case ' supercritical_hopf_radius_(strogatz)'
7
- inputs = make_input_struct(0 , ' cp_range' , - 1 : 0.01 : 0 , ' etarange' , 0.01 : 0.01 : 1 ,...
8
- ' bifurcation_point' , 0 , ' initial_conditions' , 0 ,...
9
- ' foldername' , fullfile(outfolder , ' results' ), ' numpoints' , 1000000 ,...
10
- ' parameters' , [], ' savelength' , 5000 ,...
11
- ' system_type' , ' supercritical_hopf_radius_(strogatz)' ,...
12
- ' tmax' , 1000 , ' T' , 500 , ' save_cp_split' , 100 , ...
13
- ' randomise' , 0 , ' rngseed' , 17062020 , ' vocal' , 1 );
14
-
11
+ inputs = make_input_struct(0 , ' cp_range' , - 1 : 0.01 : 0 , ' etarange' , 0.01 : 0.01 : 1 , ...
12
+ ' bifurcation_point' , 0 , ' initial_conditions' , 0 , ...
13
+ ' foldername' , fullfile(outfolder , ' results' ), ' numpoints' , 1000000 , ...
14
+ ' parameters' , [], ' savelength' , 5000 , ...
15
+ ' system_type' , ' supercritical_hopf_radius_(strogatz)' , ...
16
+ ' tmax' , 1000 , ' T' , 500 , ' save_cp_split' , save_cp_split , ...
17
+ ' randomise' , 0 , ' rngseed' , 17062020 , ' vocal' , 1 );
18
+
19
+ case ' supercritical_hopf_radius_(measurement)'
20
+ inputs = make_input_struct(0 , ' cp_range' , - 1 : 0.01 : 0 , ' etarange' , 0.01 : 0.01 : 1 , ...
21
+ ' bifurcation_point' , 0 , ' initial_conditions' , 0 , ...
22
+ ' foldername' , fullfile(outfolder , ' results' ), ' numpoints' , 1000000 , ...
23
+ ' parameters' , [], ' savelength' , 5000 , ...
24
+ ' system_type' , ' supercritical_hopf_radius_(strogatz)' , ...
25
+ ' tmax' , 1000 , ' T' , 500 , ' save_cp_split' , save_cp_split , ...
26
+ ' randomise' , 0 , ' rngseed' , 17062020 , ' vocal' , 1 );
27
+
15
28
case ' saddle_node'
16
- inputs = make_input_struct(0 , ' cp_range' , - 1 : 0.01 : -0.01 , ' etarange' , 0.0001 : 0.0001 : 0.01 , ...
17
- ' bifurcation_point' , 0 , ' initial_conditions' , 0 ,...
18
- ' foldername' , fullfile(outfolder , ' results' ), ' numpoints' , 1000000 ,...
19
- ' parameters' , [], ' savelength' , 5000 ,...
20
- ' system_type' , ' saddle_node' ,...
21
- ' tmax' , 1000 , ' T' , 500 , ' save_cp_split' , 100 , ...
22
- ' randomise' , 0 , ' rngseed' , 29062020 , ' vocal' , 1 , ' criteria' , ' max(rout, [], 2) < 3.*sqrt(-cp_range)' , ' maxAttempts' , 10 );
23
-
29
+ inputs = make_input_struct(0 , ' cp_range' , - 1.05 : 0.01 : -0.05 , ' etarange' , 0.001 : 0.001 : 0.1 , ...
30
+ ' bifurcation_point' , 0 , ' initial_conditions' , 0 , ...
31
+ ' foldername' , fullfile(outfolder , ' results' ), ' numpoints' , 1000000 , ...
32
+ ' parameters' , [], ' savelength' , 5000 , ...
33
+ ' system_type' , ' saddle_node' , ...
34
+ ' tmax' , 1000 , ' T' , 500 , ' save_cp_split' , save_cp_split , ...
35
+ ' randomise' , 0 , ' rngseed' , 29062020 , ' vocal' , 1 , ' criteria' , " max(rout, [], 2)' < 3.*sqrt(-cp_range)" , ' maxAttempts' , 1000 );
36
+
24
37
case ' lowHighNoise'
25
- inputs = make_input_struct(0 , ' cp_range' , - 1 : 0.001 : 0 , ' etarange' , [0.0001 , 1 ],...
26
- ' bifurcation_point' , 0 , ' initial_conditions' , 0 ,...
27
- ' foldername' , fullfile(outfolder , ' results' ), ' numpoints' , 1000000 ,...
28
- ' parameters' , [], ' savelength' , 5000 ,...
29
- ' system_type' , ' supercritical_hopf_radius_(strogatz)' ,...
30
- ' tmax' , 1000 , ' T' , 500 , ...
31
- ' randomise' , 0 , ' rngseed' , 30062020 , ' vocal' , 1 );
32
-
38
+ inputs = make_input_struct(0 , ' cp_range' , - 1 : 0.001 : 0 , ' etarange' , [0.0001 , 1 ], ...
39
+ ' bifurcation_point' , 0 , ' initial_conditions' , 0 , ...
40
+ ' foldername' , fullfile(outfolder , ' results' ), ' numpoints' , 1000000 , ...
41
+ ' parameters' , [], ' savelength' , 5000 , ...
42
+ ' system_type' , ' supercritical_hopf_radius_(strogatz)' , ...
43
+ ' tmax' , 1000 , ' T' , 500 , ...
44
+ ' randomise' , 0 , ' rngseed' , 30062020 , ' vocal' , 1 );
45
+
33
46
end
34
47
35
48
time_series_generator(' input_struct' , inputs );
36
49
37
50
save(fullfile(outfolder , ' inputs.mat' ), ' inputs' )
38
- end
51
+ end
0 commit comments