Help using ODE 15
조회 수: 4 (최근 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!