Matematisk Model for Mavesækkens Tømning - Danmarks Tekniske ...
Matematisk Model for Mavesækkens Tømning - Danmarks Tekniske ... Matematisk Model for Mavesækkens Tømning - Danmarks Tekniske ...
96 MATLAB kode til behandling af forsøgsdata 134 plot(Time,Cdata,'.b','MarkerSize',15) 135 hold on 136 plot(Time,predCC,'r','linewidth',2) 137 xlabel('Time [min]','fontsize',14); ylabel('Q','fontsize',14); 138 legend('Data','dQ/dt = aQˆ2 + c') 139 axis([0 Time(end) 0 1]) 140 set(get(h,'CurrentAxes'),'fontsize',14) 141 print('−depsc', '−tiff', ['modelC']) 142 print('−dpng', '−loose', ['modelC']) 143 144 % Calculating Sum of Square Errors and AIC 145 diffC = Cdata − predCC'; 146 SSEC = diffC'*diffC; 147 KC = length(DC); 148 AICC = n*log(SSEC/n)+2*KC; 149 150 % Model D 151 % Defining matrix X and finding parameters. 152 XD = [Cdata(1:end−1) ones(16,1)]; 153 DD = pinv(XD)*Y; 154 155 % Calculating the model of Y. 156 predYD = XD*DD; 157 % Plot of the model of Y with datapoints. 158 h = figure; 159 subplot(1,2,1) 160 plot(Time(2:end),Y,'b','linewidth',2) 161 hold on 162 plot(Time(2:end),predYD,'r','linewidth',2) 163 xlabel('Time [min]','fontsize',14); ylabel('dQ/dt','fontsize',14); 164 axis tight 165 166 % Calculating the model of data. 167 predCD(1) = 1; 168 for k = 2:17 169 predCD(k) = predYD(k−1)*15+predCD(k−1); 170 end 171 % Plot the model of data with datapoints. 172 subplot(1,2,2) 173 plot(Time,Cdata,'.b','MarkerSize',15) 174 hold on 175 plot(Time,predCD,'r','linewidth',2) 176 xlabel('Time [min]','fontsize',14); ylabel('Q','fontsize',14); 177 legend('Data','dQ/dt = bQ + c') 178 axis([0 Time(end) 0 1]) 179 set(get(h,'CurrentAxes'),'fontsize',14) 180 print('−depsc', '−tiff', ['modelD']) 181 print('−dpng', '−loose', ['modelD']) 182 183 % Calculating Sum of Square Errors and AIC 184 diffD = Cdata − predCD'; 185 SSED = diffD'*diffD; 186 KD = length(DD); 187 AICD = n*log(SSED/n)+2*KD; 188
189 %%%%%%%%%%%%%%%%%%%%%%%%% 1 parameter %%%%%%%%%%%%%%%%%%%%%%%%% 190 % Model E 191 % Defining matrix X and finding parameters. 192 XE = [Cdata(1:end−1).*Cdata(1:end−1)]; 193 DE = pinv(XE)*Y; 194 195 % Calculating the model of Y. 196 predYE = XE*DE; 197 % Plot of the model of Y with datapoints. 198 h = figure; 199 subplot(1,2,1) 200 plot(Time(2:end),Y,'b','linewidth',2) 201 hold on 202 plot(Time(2:end),predYE,'r','linewidth',2) 203 xlabel('Time [min]','fontsize',14); ylabel('dQ/dt','fontsize',14); 204 axis tight 205 206 % Calculating the model of data. 207 predCE(1) = 1; 208 for k = 2:17 209 predCE(k) = predYE(k−1)*15+predCE(k−1); 210 end 211 % Plot the model of data with datapoints. 212 subplot(1,2,2) 213 plot(Time,Cdata,'.b','MarkerSize',15) 214 hold on 215 plot(Time,predCE,'r','linewidth',2) 216 xlabel('Time [min]','fontsize',14); ylabel('Q','fontsize',14); 217 legend('Data','dQ/dt = aQˆ2') 218 axis([0 Time(end) 0 1]) 219 set(get(h,'CurrentAxes'),'fontsize',14) 220 print('−depsc', '−tiff', ['modelE']) 221 print('−dpng', '−loose', ['modelE']) 222 223 % Calculating Sum of Square Errors and AIC 224 diffE = Cdata − predCE'; 225 SSEE = diffE'*diffE; 226 KE = length(DE); 227 AICE = n*log(SSEE/n)+2*KE; 228 229 % Model F 230 % Defining matrix X and finding parameters. 231 XF = [Cdata(1:end−1)]; 232 DF = pinv(XF)*Y; 233 234 % Calculating the model of Y. 235 predYF = XF*DF; 236 % Plot of the model of Y with datapoints. 237 h = figure; 238 subplot(1,2,1) 239 plot(Time(2:end),Y,'b','linewidth',2) 240 hold on 241 plot(Time(2:end),predYF,'r','linewidth',2) 242 xlabel('Time [min]','fontsize',14); ylabel('dQ/dt','fontsize',14); 243 axis tight 97
- Page 59 and 60: Kapitel 5 Forsøg med normoglykæmi
- Page 61 and 62: 5.1 Forsøgsprocedure 47 Figur 5.2:
- Page 63 and 64: 5.3 7 modeller for mavesækkens tø
- Page 65 and 66: 5.3 7 modeller for mavesækkens tø
- Page 67 and 68: 5.3 7 modeller for mavesækkens tø
- Page 69 and 70: 5.3 7 modeller for mavesækkens tø
- Page 71 and 72: 5.3 7 modeller for mavesækkens tø
- Page 73 and 74: 5.4 Sammenligning af de 7 modeller
- Page 75 and 76: 5.5 Resume af Kapitel 5 61 5.5 Resu
- Page 77 and 78: Kapitel 6 Simulering af forsøgssce
- Page 79 and 80: 6.1 Hovorka modellen 65 ˙Q1(t) = U
- Page 81 and 82: 6.2 Implementering af model for bug
- Page 83 and 84: 6.2 Implementering af model for bug
- Page 85 and 86: 6.3 Simulering af clamp-forsøg 71
- Page 87 and 88: 6.3 Simulering af clamp-forsøg 73
- Page 89 and 90: 6.3 Simulering af clamp-forsøg 75
- Page 91 and 92: 6.4 Diskussion af simulering af cla
- Page 93 and 94: 6.5 Resume af Kapitel 6 79 ducerer
- Page 95 and 96: Kapitel 7 Konklusion I dette bachel
- Page 97 and 98: Bilag A MATLAB kode til kantfinding
- Page 99 and 100: 79 xlabel('Time [min]','fontsize',1
- Page 101 and 102: 22 if Data(i,j) ≥ cs 23 if Data(i
- Page 103 and 104: Bilag B MATLAB kode til fit af data
- Page 105 and 106: 82 t = 0:1:400; 83 Q = (1 + K*(t/te
- Page 107 and 108: Bilag C MATLAB kode til behandling
- Page 109: 79 % Plot of the model of Y with da
- Page 113 and 114: 299 print('−dpng', '−loose', ['
- Page 115 and 116: Bilag D MATLAB kode til simulering
- Page 117 and 118: 13 % 14 % time : t [min] 103 15 % S
- Page 119 and 120: 105 123 Q2dot = Q12 − Q21 − Q2o
- Page 121 and 122: 41 % Modified 23.07.09 SW 107 42 %
- Page 123 and 124: 109 81 subplot(223) 82 stairs(T,D,'
- Page 125 and 126: 90 91 % Plot of iv insulin infusion
- Page 127 and 128: 99 ylabel('Insulin infusion (mU/min
- Page 129 and 130: Bilag E Billeder fra forsøg med no
- Page 131 and 132: 117 Figur E.3: Her ses forsøgspers
- Page 133 and 134: Bilag F Formelle dokumenter i forbi
- Page 135 and 136: Komitéens reg.nr. (KF)____________
- Page 138 and 139: Formål Formålet med dette projekt
- Page 140 and 141: Forsøgsprocedure Efter forudgåend
- Page 142 and 143: Publikation Forsøgsresultaterne vi
- Page 144 and 145: Effekten af hypo-, normo- og hyperg
- Page 146 and 147: Driftsomkostninger og udgifter til
- Page 148 and 149: til at dosere indsprøjtningerne af
- Page 150 and 151: Følgende annonce indrykkes på int
- Page 152 and 153: 138 LITTERATUR [10] O. Goetze, A. S
- Page 154: 140 LITTERATUR [34] K. Vollmer, H.
96 MATLAB kode til behandling af <strong>for</strong>søgsdata<br />
134 plot(Time,Cdata,'.b','MarkerSize',15)<br />
135 hold on<br />
136 plot(Time,predCC,'r','linewidth',2)<br />
137 xlabel('Time [min]','fontsize',14); ylabel('Q','fontsize',14);<br />
138 legend('Data','dQ/dt = aQˆ2 + c')<br />
139 axis([0 Time(end) 0 1])<br />
140 set(get(h,'CurrentAxes'),'fontsize',14)<br />
141 print('−depsc', '−tiff', ['modelC'])<br />
142 print('−dpng', '−loose', ['modelC'])<br />
143<br />
144 % Calculating Sum of Square Errors and AIC<br />
145 diffC = Cdata − predCC';<br />
146 SSEC = diffC'*diffC;<br />
147 KC = length(DC);<br />
148 AICC = n*log(SSEC/n)+2*KC;<br />
149<br />
150 % <strong>Model</strong> D<br />
151 % Defining matrix X and finding parameters.<br />
152 XD = [Cdata(1:end−1) ones(16,1)];<br />
153 DD = pinv(XD)*Y;<br />
154<br />
155 % Calculating the model of Y.<br />
156 predYD = XD*DD;<br />
157 % Plot of the model of Y with datapoints.<br />
158 h = figure;<br />
159 subplot(1,2,1)<br />
160 plot(Time(2:end),Y,'b','linewidth',2)<br />
161 hold on<br />
162 plot(Time(2:end),predYD,'r','linewidth',2)<br />
163 xlabel('Time [min]','fontsize',14); ylabel('dQ/dt','fontsize',14);<br />
164 axis tight<br />
165<br />
166 % Calculating the model of data.<br />
167 predCD(1) = 1;<br />
168 <strong>for</strong> k = 2:17<br />
169 predCD(k) = predYD(k−1)*15+predCD(k−1);<br />
170 end<br />
171 % Plot the model of data with datapoints.<br />
172 subplot(1,2,2)<br />
173 plot(Time,Cdata,'.b','MarkerSize',15)<br />
174 hold on<br />
175 plot(Time,predCD,'r','linewidth',2)<br />
176 xlabel('Time [min]','fontsize',14); ylabel('Q','fontsize',14);<br />
177 legend('Data','dQ/dt = bQ + c')<br />
178 axis([0 Time(end) 0 1])<br />
179 set(get(h,'CurrentAxes'),'fontsize',14)<br />
180 print('−depsc', '−tiff', ['modelD'])<br />
181 print('−dpng', '−loose', ['modelD'])<br />
182<br />
183 % Calculating Sum of Square Errors and AIC<br />
184 diffD = Cdata − predCD';<br />
185 SSED = diffD'*diffD;<br />
186 KD = length(DD);<br />
187 AICD = n*log(SSED/n)+2*KD;<br />
188