26.07.2013 Views

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 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Bilag C<br />

MATLAB kode til behandling<br />

af <strong>for</strong>søgsdata<br />

1 clear all; close all;<br />

2<br />

3 % Loading data<br />

Listing C.1: curves.m<br />

4 load('normo time.mat') % Time, time vector.<br />

5 load('normo decay.mat') % CTc99m, counts in stomach from Tc99m.<br />

6 load('normo decayI.mat') % CTcIn111, counts in stomach from In111.<br />

7<br />

8 kTc = log(2)/360; % Defining trans<strong>for</strong>mation constant <strong>for</strong> 99mTc.<br />

9 DTc99m = CTc99m.*exp(kTc*Time); % Correction of physical decay.<br />

10<br />

11 kIn = log(2)/(2.83*24*60); % Defining trans<strong>for</strong>mation constant <strong>for</strong> 111In.<br />

12 DIn111 = CIn111.*exp(kIn*Time); % Correction of physical decay.<br />

13<br />

14 STc99m = DTc99m − 0.35*DIn111; % Correction of downscatter.<br />

15 Cdata = STc99m/max(STc99m); % Calculating relative amount in stomach.<br />

16<br />

17 Y = (Cdata(2:end)−Cdata(1:end−1))/15; % Calculating differential<br />

18 % quotient. Y = y(k)−y(k−1)/∆T.<br />

19 % Plot of corrected data.<br />

20 h = figure;<br />

21 plot(Time,Cdata,'.','markersize',15)<br />

22 xlabel('Time [min]','fontsize',14);<br />

23 ylabel('Fraction of food in the stomach','fontsize',14);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!