Help using ODE 15
1 回表示 (過去 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!