2020
09-29
09-29
python矩阵运算,转置,逆运算,共轭矩阵实例
我就废话不多说了,大家还是直接看代码吧!#先定义两个矩阵X=np.array([[1,2104,5,1,45],[1,1416,3,2,40],[1,1534,3,2,30],[1,852,2,1,36]])y=np.array([45,40,30,36])#内积以后发现c=np.dot(X.T,X)carray([[4,5906,13,6,151],[5906,9510932,21074,8856,228012],[13,21074,47,19,507],[6,8856,19,10,221],[151,228012,507,221,5821]])c.Id=np.dot(c.I,X.T)Traceback(mostrecent...
继续阅读 >