Check stability of fixed points of 2D vectorfield
function stability = check_stability(rho,psi,gamma,lambda,epsilon,f)
This function evaluates the eigenvalues of the Jacobian of the flow that induces a 2D vectorfield, to establish their stability. It assumes the fixed points to be hyperbolic (Jain and Haller, 2021).
nRho = length(rho);
stability = zeros(size(rho));
for j = 1:nRho
The stability is assesed by the eigenvalues of the Jacobian
J = frc_Jacobian(rho(j),psi(j),gamma,lambda,epsilon,f); trJ = trace(J); detJ = det(J);
Routh Stability criterion
if detJ>0 && trJ<0 % asymptotically stable stability(j) = 1; else % not asymptotically stable stability(j) = 0; end
end
stability = logical(stability);
end