Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. import numpy as np
  2. import numpy.linalg as npl
  3.  
  4. C1 = np.matrix([[1, 1/7, 1/5], [7, 1, 3], [5, 1/3, 1]])
  5. C2 = np.matrix([[1, 5, 9], [1/5, 1, 4], [1/9, 1/4, 1]])
  6. C3 = np.matrix([[1, 4, 1/5], [1/4, 1, 1/9], [5, 9, 1]])
  7. C4 = np.matrix([[1, 9, 4], [1/9, 1, 1/4], [1/4, 4, 1]])
  8. C5 = np.matrix([[1,1,1], [1,1,1], [1,1,1]])
  9. C6 = np.matrix([[1, 6, 4], [1/6, 1, 1/3], [1/4, 3, 1]])
  10. C7 = np.matrix([[1, 9, 6], [1/9, 1, 1/4], [1/6, 3, 1]])
  11. C8 = np.matrix([[1, 1/2, 1/2], [2, 1, 1], [2, 1, 1]])
  12.  
  13. Cparam = np.matrix([[1, 4, 7, 5, 8, 6, 6, 2],
  14. [1/4, 1, 5, 3, 7, 6, 6, 1/3],
  15. [1/7, 1/5, 1, 1/3, 5, 3, 1/5],
  16. [1/5, 1/3, 3, 1, 6, 3, 4, 1/2],
  17. [1/8, 1/7, 1/5, 1/6, 1, 1/3, 1/4, 1/7],
  18. [1/6, 1/6, 1/3, 1/3, 3, 1, 1/2, 1/5],
  19. [1/6, 1/6, 1/3, 1/4, 4, 2, 1, 1/5],
  20. [1/2, 3, 5, 2, 7, 5, 5, 1]])
  21.  
  22. wC1, wektorC1 = npl.eig(C1)
  23. wC2, wektorC2 = npl.eig(C2)
  24. wC3, wektorC3 = npl.eig(C3)
  25. wC4, wektorC4 = npl.eig(C4)
  26. wC5, wektorC5 = npl.eig(C5)
  27. wC6, wektorC6 = npl.eig(C6)
  28. wC7, wektorC7 = npl.eig(C7)
  29. wC8, wektorC8 = npl.eig(C8)
  30.  
  31. print(wC1)
  32. print()
  33. print(wektorC1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement