# How to increase Maximum number of steps in any other functions except NDSolve?

I want to plot an output response from a state space model. I use StateResponse[] to calculate it and then plot it. When I run my code, I face this message:

NDSolve::mxst: Maximum number of 10000 steps reached at the point t == 0.007796405242565201.

I do not even use NDSolve[] command to solve my equations! This is my code and its answer:

u = -kk.StateResponse[ssmModelC, UnitStep[t] , {t, 0, 10}]

How is it possible to increase number of steps in StateResponse[]?

• Could you provide a minimum working example? – Rod Jul 2 '13 at 18:50
• @ Rod LM :I edited my post and give an example. Hope you find it useful! – Shield Jul 2 '13 at 18:57
• @user8364 But you forgot to put your definition for ssmModelC... the code is still not working. – Rod Jul 2 '13 at 18:59
• @ Rod LM : Actually, ssmModelC is a 120*120 Matrix and 3 more huge matrixes, which build my space state model, and I can not put them here! The point is Maximum steps to calculate the response between 0 and 10 seconds! I have no idea to increase the number of steps! – Shield Jul 2 '13 at 19:04
• This option would work Method -> {"NDSolve", MaxSteps -> value}, although undocumented. – Suba Thomas Jul 2 '13 at 20:31

The MaxSteps option (or any other option to NDSolve) can be adjusted by specifying it as a suboption.
u = -kk.StateResponse[ssmModelC, UnitStep[t] , {t, 0, 10}, Method -> {"NDSolve", MaxSteps -> value}]

And regarding when NDSolve` is used, pretty much when there is a continuous-time system and the time specification is of the form $\{t, tmin, tmax\}$.