# Matlab ODE problem

1. Oct 2, 2009

### JohnSimpson

I've been doing some work with coupled ODEs in Matlab. I've been using ODE15s, and calculating the solutions of 40 coupled equations between t=0.....0.01, but Matlab seems to be calculating far more accurately than I want, it's taking 40 minutes to produce a solution and determining the function at over a million points on the domain.

Any suggestions on how to make things a little less precise? If I only had one of every thousand of the points it calculates, I'd be happy.

2. Oct 3, 2009

### jamesrc

You can specify the points for which the solution is found if you give a vector for the tspan argument. So, if you're saying that it's calculating for too many points when you use t = [0 .01], then you can just specify t = (0:.001:.01) or whatever values it is that you want there. I hope that helps.

3. Oct 3, 2009

### JohnSimpson

Thanks james. the problem with that is that odeXX continues to calculate the intermediate points regardless, and at the end just spits out the points you requested. So the computation time is exactly the same.

4. Oct 3, 2009

### jamesrc

Oh - sorry about that. Have you tried playing with the tolerance? If you relax the default settings on RelTol and AbsTol, maybe it won't require such a small step size.

Other than that I'm not really sure - that might just be the best you can do with the complexity of your system.

Last edited: Oct 3, 2009