Not Enough Input Arguments

조회 수: 6 (최근 30일)
Joel Stewart Miller
Joel Stewart Miller 2021년 11월 19일
댓글: Joel Stewart Miller 2021년 11월 19일
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!

답변 (1개)

KSSV
KSSV 2021년 11월 19일
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
Joel Stewart Miller
Joel Stewart Miller 2021년 11월 19일
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)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 PSK에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by