Develop a Kinetic Model

8 次查看(过去 30 天)
Karan Suresh
Karan Suresh 2019-6-27
Hi. I need to develop a running MATLAB function to get the output graph shown below using the kinetic equations below . I tried to use a function to develop the code but it doesnt give the right result
The reaction is as follows :
The reactions in the second picture are intermediate reactions.
The required output is as shown in Fig 6 (a)
Here is the function code I developed with values for rate constants (values of k ) being assumed from the paper and the output I got from that code :
function [f] = conc(~,x)
%UNTITLED4 Summary of this function goes here
% Detailed explanation goes here
dx=zeros(6,1);
%rate constant values
k1p = 4*(10^(-3));
k1m = 2.2*(10^(-17));
k2p = 7.5*(10^(-3));
k2m = 1.9*(10^(-25));
k3p = 1.3*(10^(-4));
k3m = 1.3*(10^(-10));
k4p = 3.1*(10^(-5));
k4m = 1.3*(10^(-3));
%ODES
dx(1) = -k1p*x(1)*x(2) - k2p*x(1)*x(3) + k1m*x(4) + k2m*x(5);
dx(2) = -k1p*x(1)*x(2) - k4p*x(5)*x(2) + k1m*x(4) + k4m*x(6);
dx(3) = -k2p*x(1)*x(3) - k3p*x(4)*x(3) + k2m*x(5) + k3m*x(6);
dx(4) = -k3p*x(4)*x(3) - k1m*x(4) + k3m*x(6) + k1p*x(1)*x(2);
dx(5) = -k4p*x(5)*x(2) - k2m*x(5) + k4m*x(6) + k2p*x(1)*x(3);
dx(6) = k3p*x(4)*x(3) + k4p*x(5)*x(2) -k3m*x(6) - k4m*x(6) ;
f=[dx]; %o/p
Main Code
>> [t,x] = ode15s(@conc,[0 100],[0 30 60 30 0 0]);
>> plot(t,x)
>> legend('[M]','[Q]','[T]','[MQ]','[QT]','[MQT]')
>> title(‘Kinetic Analysis’)
>> xlabel(‘Time(in seconds)’)
>> ylabel(‘Concentration(in nM)’)
I want to know what the error with the code is and also if anyone can develop a function codem that gives the required response , it would of great help

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by