Not Enough Input Arguments

6 visualizaciones (últimos 30 días)
Joel Stewart Miller
Joel Stewart Miller el 19 de Nov. de 2021
Comentada: Joel Stewart Miller el 19 de Nov. de 2021
I am running a reversible Michaelis-Menten equation and keep getting the "mm requires more input arguments to run" error. Here is my code:
function [ dydt ] = mm( t, y, km1, kp1, km2, kp2)
clc
%MM derivatives for Michaelis Menten kinetics
% MM kinetics: % a + e <==> c
% c <==> e + b
a = y(1);
e = y(2);
c = y(3);
b = y(4);
dydt = [ -(km1 * a * e) + (kp1 * c); %concen a
-(km1 * a * e) + (kp1 * c) + (km2 * c) - (e * b * kp2); %concen e
(km1 * a * e) - (kp1 * c) - (km2 * c) + (kp2 * e * b); %concen c
(km2 * c) - (e * b * kp2); %concen b
];
km1&2 are forward rate constants and kp1&2 are the backwards rate constants
Thank you for the help!

Respuestas (1)

KSSV
KSSV el 19 de Nov. de 2021
It seems you are straigh away running the function using run button or without providing the inputs. You need to define the inputs and then call the function.
% define your input variables
t = value ; % give your value
y = value ;
km1 = value ;
kp1 = value ;
km2 = value ;
kp2 = value ;
% Now call the function
dydt = mm( t, y, km1, kp1, km2, kp2) ;
  1 comentario
Joel Stewart Miller
Joel Stewart Miller el 19 de Nov. de 2021
I am calling this function over to a second script where I define all of the k values. Sorry if I wasn't clear in the original question.
Here is the script where I am trying to call the mm function
kp1=1000;
km1=1;
kp2=0.1;
km2=10;
tspan = [0 1000];
a0 = 0.001;
b0 = 0;
c0 = 0;
E0 = 0.0004;
e0 = 0.0001; %E0-c0=e0
y0 = [a0;b0;c0;e0];
ode15s(@mm, tspan, y0);
This is all of the information I was given (apart from some k equilibrium values for later parts of the question)

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by