Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. grid = np.linspace(-5, 5)
  2. i = 1
  3. for A, b in zip([A_1, A_2, A_3, A_4], [b_1, b_2, b_3, b_4]):
  4. plt.plot(grid, stability(grid, A, b))
  5. plt.plot(grid, np.ones(grid.shape), color = 'orange')
  6. plt.plot(grid, np.full(grid.shape, -1), color = 'orange')
  7. st = stability(z, A, b)
  8. plt.scatter(z, st)
  9. plt.title('Method #{}'.format(i))
  10. plt.xlabel('z')
  11. plt.ylabel('R(z)')
  12. plt.ylim(-5, 5)
  13. plt.xlim(-5, 5)
  14. i += 1
  15. plt.show()
  16. print(*np.around(st, 3))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement