Help using ODE 15
5 次查看(过去 30 天)
显示 更早的评论
I have the script below... t0=0,200 x0=[10, 100, 0, 0]
[t,X]=ode15('wtf',t0,x0)
which runs the following function...function X=wtf(t,y); %Define initial values of k1, k2,k3,S,P,E and C k1=.005; k2=.005; k3=0.1; %S=100 %P=0 %E=10 %C=0 %y=[E S C P]
y=[10 100 0 0]
%Equations for P
X(1)=k2*y(3) +k3*y(3)-k1*y(1)*y(2) X(2)= k2*y(3) -k1*y(1)*y(2) X(3)= k1*y(1)*y(2)-(k2*y(3))-(k3*y(3))-(k2*y(3)) X(4)=k3*y(3)
end
When trying to run it i get the following error code... Undefined function 'ode15' for input arguments of type 'char'.
Error in RunODE15 (line 4) [t,X]=ode15('wtf',t0,x0) >>
any idea why?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!