predict()#
- DiscreteModel.predict(state0, niters, inputs=None)[source]#
Step forward the discrete dynamical system
niters
steps. Essentially, this amounts to the following.>>> states[:, 0] = state0 >>> states[:, 1] = model.rhs(states[:, 0], inputs[:, 0]) >>> states[:, 2] = model.rhs(states[:, 1], inputs[:, 1]) ... # Repeat `niters` times.
- Parameters:
- state0(r,) ndarray
Initial state.
- nitersint
Number of times to step the system forward.
- inputs(m, niters-1) ndarray or None
Inputs for the next
niters - 1
time steps.
- Returns:
- states(r, niters) ndarray
Solution to the system, including the initial condition
state0
.