from tdscontrol import *
import numpy as np
import matplotlib.pyplot as plt

if __name__ == "__main__":
    A0 = np.array([[1., 2.], [-3., 4.]])
    A1 = np.array([[-2., 3.],[5., -6.]])
    system = tds([A0, A1], [0., 1.])
    l1 = roots(system, -1.)
    print(type(l1))
    plt.plot(np.real(l1), np.imag(l1), "x")
    system.A(1)[1, 1] = 5
    system.hA()[1] = 2.
    l2 = roots(system, -1.)
    plt.plot(np.real(l2), np.imag(l2), "o")
    plt.show()
