フィルターのクリア

Systems Biology - Maltus Law

1 回表示 (過去 30 日間)
JB
JB 2018 年 8 月 7 日
回答済み: Star Strider 2018 年 8 月 7 日
Greetings!
I recently tried to run my code using ode45:
Define function in ODE called "sysbio1.m":
function dzdt = sysbio1(t,z,k)
dzdt=k*z;
end
Parameters in command window:
k = 0.7;
x0 = 1;
tspan = [0,5];
[t,x] = ode45(@sysbio1,tspan,x0,[],k);
plot(t,'XData',k)
I am trying to make a plot that simulates numerical integration. I think I am on to something, but I am sure it is trivial to some of you. Any assistance would be greatly appreciated.
V/R jb

回答 (1 件)

Star Strider
Star Strider 2018 年 8 月 7 日
Use this ode45 call instead:
[t,x] = ode45(@(t,z)sysbio1(t,z,k),tspan,x0);
and change the plot call to:
plot(t,x)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by