-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsolver_compare.asv
More file actions
81 lines (67 loc) · 1.45 KB
/
solver_compare.asv
File metadata and controls
81 lines (67 loc) · 1.45 KB
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
% solve odes
close all;
% y0 = zeros(8,1); % initial conditions
% y0(7)=10^(-5); %easy to change variables in this way,"Kd"
% y0(8)=0.0659; %"A"
%
% % transient
% [T,Y] = ode45(@rhs,[0,72],y0);
%
% % solve odes
% [T,Y] = ode45(@rhs,[0,72],Y(end,:));
%
% figure(1);
% y1 = Y(:,1);
% y2 = Y(:,2);
% y3 = Y(:,3);
% y4 = Y(:,4);
% y5 = Y(:,5);
% y6 = Y(:,6);
% plot(T,y1,T,y2,T,y3,T,y4,T,y5,T,y6,'LineWidth',2); %repressor as time
% legend("y_1","y_2","y_3","y_4","y_5","repressors");
% xlabel('hours')
% ylabel('concentration')
% ylim([0 2]);
% % solve odes
%
% % transient
% y0 = ones(8,1); % initial conditions
% [T,Y] = ode45(@rhs,[0,500],y0);
%
% % solutions to plot
% [T,Y] = ode45(@rhs,[0,72],Y(end,:));
%
% figure(1);
% plot(T,Y(:,1),'LineWidth',2)
% ylim([0 2]);
% transient
y0 = ones(9,1); % initial conditions
[T,Y] = ode45(@rhs_ft,[0,500],y0);
% solutions to plot
[T,Y] = ode45(@rhs_ft,[0,72],Y(end,:));
figure(1);
plot(T,Y(:,1),'LineWidth',2)
ylim([0 1.5]);
xticks(0:12:72);
xlabel('Zeitgeber Time (hours)','FontSize',18);
ylabel('$y_1$','FontSize',18,'Interpreter','latex');
ax = gca;
ax.FontSize = 18;
for j=1:
% %change the translation of the light function
% y0(9)=30; %the translation of the ft function
%
%
% [T,Y] = ode45(@rhs_ft,[0,500],y0);
%
% % solutions to plot
% [T,Y] = ode45(@rhs_ft,[0,72],Y(end,:));
%
% figure(2);
% y1 = Y(:,1);
% plot(T,y1);
% hold on;
% light=ft(T,y0(9));
% plot(T,light);
% legend("y_1","light");
% xlabel('hours');