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

Ode 23 problems in matlab

  1. Mar 16, 2010 #1
    Hi, I want to solve an ODE in matlab using ode23 and ode23s to compare results. I've written a code and it seems to work fine for ode23s, I even tried it for ode 23t and ode45 but for some reason when I use ode23 I get an error message.

    This is the code I've been using;

    function hode23seg

    [T,Y]=ode23(@yprime1,[0 20],1);
    [T2,Y2]=ode23s(@yprime1,[0 20],1);
    semilogy(T,abs(Y),'bo',T2,abs(Y2),'r*');

    function dy=yprime1(t,y)
    dy=-30*y;

    The error message is

    ??? Error using ==> ode23
    Too many input arguments.

    Error in ==> hode23seg at 3
    [T,Y]=ode23(@yprime1,[0 20],1);

    Does anyone have any ideas what's going on?

    Thanks
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Ode 23 problems in matlab
  1. ODE in Matlab (Replies: 3)

  2. Matlab ODE problem (Replies: 3)

  3. ODE matlab (Replies: 2)

Loading...