# Unstable example (spectral abscissa >= 0):
phi <- matrix(
data = c(
0.10, -0.40,
0.50, 0.20
),
nrow = 2
)
TestPhiHurwitz(phi = phi) # FALSE
# Stable example (all real parts < 0):
phi <- matrix(
data = c(
-0.50, -0.20,
1.00, -0.30
),
nrow = 2
)
TestPhiHurwitz(phi = phi) # TRUE
TestPhiHurwitz(phi = phi, eps = 1e-12) # also TRUE with tolerance
Run the code above in your browser using DataLab