How to calculate rate constant if population vs time table data is given?

3 Ansichten (letzte 30 Tage)
Arun
Arun am 13 Sep. 2022
Kommentiert: Sam Chak am 13 Sep. 2022
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
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)?

Melden Sie sich an, um zu kommentieren.

Antworten (3)

David Hill
David Hill am 13 Sep. 2022
N=[1 2 3 4.5 7 10 16 29 56 104];
fit((1:length(N))',N','exp1')
ans =
General model Exp1: ans(x) = a*exp(b*x) Coefficients (with 95% confidence bounds): a = 0.2322 (0.1555, 0.3088) b = 0.61 (0.5757, 0.6444)

Sam Chak
Sam Chak am 13 Sep. 2022
Bearbeitet: Sam Chak am 13 Sep. 2022
Hi @Arun,
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')

Torsten
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)
Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance.
p = 0.5108
hold on
plot([0,t],[1,N])
plot([0,t],fun(p,[0,t]))
hold off

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by