1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help in solving a system of ODEs using MATLAB

  1. Feb 24, 2009 #1
    Hello, I have been trying to solve this problem and the only thing I got is errors and errors. Also I need to plot y versus t, y' versus t and y' versus y??

    1. The problem statement, all variables and given/known data

    The system of ODEs

    y1'= y2
    y2'= -2y1-0.03y13

    The time span is [0:0.1:5]
    and there are no initial conditions!

    Need to be solved using ODE45 solver



    2. Relevant equations

    None


    3. The attempt at a solution

    I created this m-file

    function yprime = syst1(t, y)
    yprime = [y(2); -2*y(1)-0.03*(y(1))^3];

    then in the command window

    tspan=[0:01:5]
    [t y]=oder45 ('syst1', tspan)


    and then nothing comes out. I have found many examples of solving systems of ODEs but all of them with initial conditions which is not my case. Can someone explain me waht I am doing wrong?

    Than You
     
  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?



Similar Discussions: Help in solving a system of ODEs using MATLAB
Loading...