I am attempting to find the value of K such that the following matrix has any eigenvalue with a positive real part, but I keep getting nonsense. What's a better way of doing this?
K = 0;
A = [ 0 1 0; 0 0 1; -K -2 -3];
while K < 10
e = eig(A);
A = [ 0 1 0; 0 0 1; -K -2 -3 ];
if any(real(e)) > 0
K
break;
end
K = K + 1/100;
end