1. Limited time only! Sign up for a free 30min personal 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!

Matlab ode45 Problem

  1. Mar 2, 2013 #1
    I'm trying to solve an ODE using matlab's ode45, but I'm receiving the following error:

    Warning: Failure at t=4.509803e+01. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.136868e-13) at time t.

    Can anybody explain what this means?
     
  2. jcsd
  3. Mar 2, 2013 #2

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    Sounds like ode45 is having trouble converging on a solution.

    In order to diagnose the problem in more detail, you should probably post the ODE you are trying to solve.
     
  4. Mar 3, 2013 #3
    function dxdt = test(t,x)
    mu = 398600.64;
    dxdt_1 = x(2);
    dxdt_2 = (-mu/x(1)^3)*x(1);
    dxdt = [dxdt_1;dxdt_2];

    It's a second-order ODE and I'm trying to solve it from the time interval of 0 to 28800. When I lower this time interval to something like 50, the program seems to work fine, but anything higher than that, it stops to converge. Here is my code to run it:

    t = 0:28800
    [t x] = ode45(@test,t,[1000;-7]);
     
  5. Mar 3, 2013 #4

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    I don't have the ODE you are trying to solve, only your reformulation for Matlab.
     
  6. Mar 3, 2013 #5
    I'm trying to solve the orbit motion of equation x,doubledot = (-mu/x^3)*x, with an initial condition of x0 = 1000, and xdot,0 = -7.
     
  7. Mar 4, 2013 #6
    Do you know why it's not converging?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Matlab ode45 Problem
  1. Matlab: ode45 help (Replies: 1)

Loading...