Help using ODE 15

4 views (last 30 days)
Kyle
Kyle on 11 Feb 2014
Commented: Kyle on 11 Feb 2014
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?
  2 Comments
Kyle
Kyle on 11 Feb 2014
.
Kyle
Kyle on 11 Feb 2014
anyone have an idea?

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!