jacobian()#
- InterpContinuousModel.jacobian(t, parameter, state, input_func=None)#
Sum the state Jacobian of each model operator.
This the derivative of the right-hand side of the model with respect to the state, i.e., the function \(\ddqhat\fhat(\qhat(t), \u(t); \bfmu)\) where the model is given by \(\ddt\qhat(t; \bfmu) = \fhat(\qhat(t), \u(t); \bfmu)\).
- Parameters:
- tfloat
Time \(t\), a scalar.
- parameter(p,) ndarray
Parameter value \(\bfmu\).
- state(r,) ndarray
State vector \(\qhat(t)\) corresponding to time
t
.- input_funccallable(float) -> (m,), or None
Input function that maps time
t
to the input vector \(\u(t)\).
- Returns:
- jac(r, r) ndarray
State Jacobian of the right-hand side of the model.
Notes
For repeated
jacobian()
calls with the same parameter value, useevaluate()
to first get the nonparametric model corresponding to the parameter value.# Instead of this... >>> jacs = [parametric_model.jacobian(t, parameter, q, input_func) ... for t, q in zip(times, states)] # ...it is faster to do this. >>> model_at_parameter = parametric_model.evaluate(parameter) >>> jacs = [model_at_parameter.jacobian(t, parameter, q, input_func) ... for t, q in zip(times, states)]