Results 1 to 2 of 2

Math Help - matlab programme too long to run

  1. #1
    Newbie
    Joined
    May 2009
    Posts
    12

    matlab programme too long to run

    hi all..
    actually my code is taking too long to run.i am numerically
    integrating equation using quad.i think reason behind code taking
    so much time is that there are lot of singularities coming while
    integrating the expression.So while going thro' these
    discontinuities ODE45(i also used) is taking very small steps and
    hence it is taking hours to run the code.
    possible solution to thses kind of stiff equations is to use ODE15s.I
    tried that too but its accuracy is far too low and hence it is not
    showing appropriate results.
    If u have any other solution to this problem ..plz suggest me.
    thank U!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by shaileshdhutekar View Post
    hi all..
    actually my code is taking too long to run.i am numerically
    integrating equation using quad.i think reason behind code taking
    so much time is that there are lot of singularities coming while
    integrating the expression.So while going thro' these
    discontinuities ODE45(i also used) is taking very small steps and
    hence it is taking hours to run the code.
    possible solution to thses kind of stiff equations is to use ODE15s.I
    tried that too but its accuracy is far too low and hence it is not
    showing appropriate results.
    If u have any other solution to this problem ..plz suggest me.
    thank U!
    Where are they and what type of singularities are we talking about here?

    In general I would switch to a fixed step length method (in fact Euler or a simple predictor corrector based on Euler) and use a small step.

    (and possibly use a number of step lengths and look at how the answer changes with step length and then consider Richardson extrapolation).

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. MATLAB programme
    Posted in the Math Software Forum
    Replies: 1
    Last Post: October 8th 2011, 08:04 PM
  2. [SOLVED] Long Factoring
    Posted in the Algebra Forum
    Replies: 2
    Last Post: December 4th 2010, 01:18 PM
  3. Here's a long one
    Posted in the Advanced Algebra Forum
    Replies: 0
    Last Post: October 6th 2009, 01:05 PM
  4. Written programme in mathematica but didn't work
    Posted in the Math Software Forum
    Replies: 0
    Last Post: April 4th 2008, 12:49 AM
  5. I'm so long on this one...
    Posted in the Calculus Forum
    Replies: 5
    Last Post: September 26th 2007, 07:34 PM

Search Tags


/mathhelpforum @mathhelpforum