-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_init_more.m
84 lines (68 loc) · 1.52 KB
/
main_init_more.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
%% Import biftool
clear;
close all;
addpath('C:\dde_biftool\ddebiftool',...
'C:\dde_biftool\ddebiftool_extra_psol',...
'C:\dde_biftool\ddebiftool_extra_nmfm',...
'C:\dde_biftool\ddebiftool_utilities');
%% Setup rhs
% There are two delays: tauK and tauD
funcs=set_funcs(...
'sys_rhs', @rhs_more,...
'sys_tau', @sys_tau_more,...
'sys_ntau',@()2);
%% Global parameters
% Global parameters will not be used as bifurcation parameters.
global pE dE1 dE2 wE nE KE betaE
global pI dI1 dI2 wI nI KI
global JK JD tauK tauD
global N
global vK vD
global wa_K wd_K wa_D wd_D K_K K_D R_K R_D
global M_K M_D eps
global dK wK dD wD
% global Vtip
global alphaK gammaK alphaD gammaD
%% Values of global parameters
dE1 = 1;
dE2 = 1;
dI1 = 1;
dI2 = 1;
nE = 4;
nI = 4;
KE = 2;
KI = 2;
betaE = 1;
wa_K = 5; wd_K = 1;
wa_D = 5; wd_D = 1;
K_K = wa_K/wd_K;
K_D = wa_D/wd_D;
R_K = 1/K_K;
R_D = 1/K_D;
M_K = 1;
M_D = 1;
eps = 1;
dK = 1;
wK = 1;
dD = 1;
wD = 1;
%% Indices of bifurcation parameters
ind_alphaK = 1;
ind_alphaD = 2;
ind_pE = 3;
ind_wE = 4;
ind_pI = 5;
ind_wI = 6;
ind_vK = 7;
ind_vD = 8;
ind_N = 9;
ind_dK = 10;
ind_wK = 11;
ind_dD = 12;
ind_wD = 13;
%% Functions for generating bifurcation diagrams
getpar=@(x,i)arrayfun(@(p)p.parameter(i),x.point);
getx=@(x,i)arrayfun(@(p)p.x(i),x.point);
% ???
bgetpar=@(x,i,bif)arrayfun(@(p)p.parameter(i),x.point(br_getflags(x,bif)));
bgetx=@(x,i,bif)arrayfun(@(p)p.x(i),x.point(br_getflags(x,bif)));