将列表 list1转换成4*4的矩阵,并求其逆矩阵 list1 =[2,7,9.10,12,4,6,90,7,35,44,37,8,10,12,14]
时间: 2023-10-08 08:06:16 浏览: 49
V4L2_PWM.tar.gz_ubuntu v4l2
import numpy as np
list1 =[2,7,9,10,12,4,6,90,7,35,44,37,8,10,12,14]
matrix1 = np.array(list1).reshape(4,4) # 转换成4*4的矩阵
print(matrix1)
matrix_inv = np.linalg.inv(matrix1) # 求逆矩阵
print(matrix_inv)
阅读全文