function [stable] = isitstable(A) % This simple function just uses maxeig to % determine if a linear dynamical system % described by xdot = Ax is stable or not. % It returns 0 if unstable and 1 if stable. l = maxeig(A); if l >= 0 stable = 0; else stable = 1; end