Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab and system of equation

  1. May 14, 2012 #1
    I have function:

    Code (Text):

    function dxdy = kkd(t,y)
    x=y(1);
    y=y(2);
    dxdy(1)=-0.02*x+x*x*y+0.01;
    dxdy(2)=0.02*x-x*x*y;

     
    next

    [t,y]=ode45(@kkd,[0 4],[0 10]);

    but is error... Where is error??
     
  2. jcsd
  3. May 14, 2012 #2

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    you never set the initial conditions, what is y(1) and y(2)?
     
  4. May 15, 2012 #3
    It is ok, work.

    I greet.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook