Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- grid = np.linspace(-5, 5)
- i = 1
- for A, b in zip([A_1, A_2, A_3, A_4], [b_1, b_2, b_3, b_4]):
- plt.plot(grid, stability(grid, A, b))
- plt.plot(grid, np.ones(grid.shape), color = 'orange')
- plt.plot(grid, np.full(grid.shape, -1), color = 'orange')
- st = stability(z, A, b)
- plt.scatter(z, st)
- plt.title('Method #{}'.format(i))
- plt.xlabel('z')
- plt.ylabel('R(z)')
- plt.ylim(-5, 5)
- plt.xlim(-5, 5)
- i += 1
- plt.show()
- print(*np.around(st, 3))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement