Serafim_

Решение уровнений из матриц

May 23rd, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. import numpy as np
  2.  
  3. A = np.array([[5.0, 1, -2, 1],[1.0,-1, 1, -1],[1.0, 1, 1, 1],[1.0, -2, -1, 1]])
  4.  
  5. b = np.array([2, 7.0, 9, -4])
  6.  
  7. x_0 = np.array([1,3])
  8.  
  9. A_1 = np.linalg.inv(A)
  10.  
  11. print np.dot(A_1,b)
Advertisement
Add Comment
Please, Sign In to add comment