How to calculate rate constant if population vs time table data is given?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have to determine the rate constant of the first order kinetics growth of a population. For a period of 70 seconds, the population growth data has been provided something like this, N = [1 2 3 4.5 7 10 16 29 56 104 and so on..]
The equation is dN/dT = rN
I have plotted the graph in MATLAB but I have no idea how to calculate the rate constant using the curve or the equation. Is it as simple as determining the slope for the graph over a region or do I have to use ode45?
1 Kommentar
Sam Chak
am 13 Sep. 2022
@Arun, Based on an educated guess, the population dynamics should be
Can you provide the full data of t from 0 to 70, and N all the way up to the Carrying Capacity K (Kapazitätsgrenze)?
Antworten (3)
David Hill
am 13 Sep. 2022
N=[1 2 3 4.5 7 10 16 29 56 104];
fit((1:length(N))',N','exp1')
0 Kommentare
Sam Chak
am 13 Sep. 2022
Bearbeitet: Sam Chak
am 13 Sep. 2022
Looks like you want to find the value of r to fit the data into the differential equation:
The analytical solution is given by
I have found by taking and solving for .
T = linspace(0, 70, 10); % just an assumption, maybe not linearly-spaced
N = [1 2 3 4.5 7 10 16 29 56 104];
r = 1/70*(3*log(2) + log(13));
odefcn = @(t, n) r*n;
[t, n] = ode45(odefcn, [0 70], 1);
plot(t, n, T, N, 'p'),
grid on, xlabel('t'), ylabel('N'), legend('fitted', 'data')
0 Kommentare
Torsten
am 13 Sep. 2022
Bearbeitet: Torsten
am 13 Sep. 2022
I assume N is given after 1 second each and starts at t=0 with N(0) = 1.
t = 1:9;
N = [2 3 4.5 7 10 16 29 56 104];
fun = @(p,t)exp(p(1)*t);
fun1 = @(p,t)fun(p,t)-N;
p0 = 0.1;
p = lsqnonlin(@(p)fun1(p,t),p0)
hold on
plot([0,t],[1,N])
plot([0,t],fun(p,[0,t]))
hold off
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!