1function [J, rhs, vars, equilibria] = getJacobian(self, options)
2% [J, RHS, VARS, EQUILIBRIA] = GETJACOBIAN(OPTIONS)
4% Jacobian of the mean-field ODE right-hand side, d f_i / d x_j, as a cell
5% matrix of expression strings, computed exactly by the computer algebra
8% The Jacobian
is what tells a fixed point apart from a limit cycle and gives
9% the local convergence rate of the fluid approximation, neither of which a
10% numerical integration reports. EQUILIBRIA, returned only when asked
for as a
11% fourth output, are the solutions of f(x) = 0; they can be empty when the
12% system
is beyond what the backend solves in closed
form, which
is a
13% limitation of the solve and not an assertion that none exist.
15% Only smooth drifts have a Jacobian: see getSymbolicDrift, which refuses the
16% min-scaled methods by name rather than returning a one-sided derivative.
18% @param options Solver options (optional, defaults to the solver
's own)
19% @return J Cell matrix of expressions, J{i,j} = d f_i / d x_j
20% @return rhs The drift itself, one expression per state variable
21% @return vars The state variable names
22% @return equilibria Struct array of solutions of f(x) = 0 (optional)
24% Copyright (c) 2012-2026, Imperial College London
27if nargin < 2 || isempty(options)
28 options = self.getOptions();
30[rhs, vars] = self.getSymbolicDrift(options);
33if isfield(options, 'config
') && isfield(options.config, 'symbolic
')
34 backend = options.config.symbolic;
36url = SAGE.resolve(backend);
43 want{end+1} = 'equilibria
';
46if isfield(options, 'config
') && isfield(options.config, 'symbolic_timeout
')
47 timeout = options.config.symbolic_timeout;
49[J, ~, equilibria] = SAGE.fluidODEs(rhs, vars, want, url, timeout);