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!

Homework Help: Matlab ode solve takes too big steps?

  1. Oct 11, 2012 #1
    1. The problem statement, all variables and given/known data
    I have a set of differential equations, wich need to be solved by matlabs solvers. all of the states have to stay between 0 and 1, but they don't. I'm 100% sure my equations are right, but matlab is taking too big steps, causing the state to go negative or above 1.
    most of the time it's only something like -10^6, but this is still wrong and causes a lot of problems. Sometimes the negative values don't stay that low and as state get a value like -400. Again, I'm sure my equations are right, and saying that they aren't isn't gonna help me. If someone has any idea on how to fix this it would be greatly appreciated.
    (also I'v tried lowering the tolerance and using 'NonNegative', and I'v tried all different solvers)
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

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