type enzymeRhs.m
function [f,dfdy,dfdk] = enzymeRhs(y,k)
%ENZYMERHS evaluates the right hand side of the enzyme ODE system.
%
% [F,DFDY,DFDK] = ENZYMERHS(Y,K) evaluates the right hand side for the
% enzyme system with rates K and current concentration Y and returns F,
% the value of the right hand side as well as DFDY and DFDK, the
% gradient of the right hand side function with respect to
% concentrations Y and rates K, respectively.
%
C = 0.1; %constant creation of substrate
f = zeros(2,1);
f(1) = y(2) - k(1)*y(1)/(k(2)+y(1)) + C;
f(2) = -y(2) + k(1)*y(1)/(k(2)+y(1));
if nargout>1
dfdy = [-k(1)/(k(2)+y(1))+k(1)*y(1)/(k(2)+y(1))^2 1;
k(1)/(k(2)+y(1))-k(1)*y(1)/(k(2)+y(1))^2 -1];
dfdk = [-y(1)/(k(2)+y(1)) k(1)*y(1)/(k(2)+y(1))^2;
y(1)/(k(2)+y(1)) -k(1)*y(1)/(k(2)+y(1))^2];
end
Let y^T = ([S], [P]) and k^T = (μ, γ). Write down the system of ordinary differential equations that
describes system (2) (Notation: dydt = f (y, k)). The file enzymeRhs.m contains the Matlab function
enzymeRhs that evaluates the function f (y, k) and computes the Jacobians ∇y f and ∇k f. Verify the
correctness of your derivation by comparing with the system in enzymeRhs.m!