get_linear_system function¶
(Shortest import: from brian2.stateupdaters.exact import get_linear_system)
- brian2.stateupdaters.exact.get_linear_system(eqs, variables)[source]¶
Convert equations into a linear system using sympy.
- Parameters:
eqs :
EquationsThe model equations.
- Returns:
(diff_eq_names, coefficients, constants) : (list of str,
sympy.Matrix,sympy.Matrix)A tuple containing the variable names (
diff_eq_names) corresponding to the rows of the matrixcoefficientsand the vectorconstants, representing the system of equations in the form M * X + B
Raises
ValueErrorIf the equations cannot be converted into an M * X + B form.