华为在线学习

在线学习

import numpy as np

"""
10X + 8 Y + 12 Z = 20
4X + 4Y + 2 Z = 8
2X -4 Y -2Z = -5
"""
k_matrix = np.array([[10,8,12],
          [4,4,2],
          [2,-4,-2]])

result_matrix = np.array([[20],[8],[-5]])
x_matrix = np.linalg.solve(k_matrix,result_matrix)

print(x_matrix)

转载于:https://www.cnblogs.com/Frank99/p/11002401.html

你可能感兴趣的:(python)