%%%% lyapunov2_eps.m

clear; format compact
% --- ƒXƒeƒbƒv 1 ---------
A = [ 0  1
      2 -3 ];
% --- ƒXƒeƒbƒv 2 ---------
P = sdpvar(2,2,'sy');
% --- ƒXƒeƒbƒv 3 ---------
LMI = set([]);
M = P*A + A'*P;
ep = 1e-7;
LMI = LMI + set(M < - ep*eye(2));
LMI = LMI + set(P > ep*eye(2));
LMI = LMI + set(trace(P) == 1);
% --- ƒXƒeƒbƒv 4 ---------
sol = solvesdp(LMI)
% ------------------------
if sol.problem ~= 1 
% --- ƒXƒeƒbƒv 5 ---------
  P_feas = double(P)
  sign(eig(double(P))')
  sign(eig(double(-M))')
end