#求Household矩阵
Identity_matrix_num = 4
I = np.identity(Identity_matrix_num)
z = np.array([1.2-math.sqrt(4.29), 0.5, 0.8, 1.4])
z_T = z.reshape(1, 4)
z_self = z.reshape(-1, 1)
H = I - 2*np.dot(z_self, z_T)/np.dot(z_T, z_self)
print(H)
c = np.array([1.2, 0.5, 0.8, 1.4])
c1 = c.reshape(-1, 1)
Y = np.dot(H, c1)
print(Y)
题目如下:
![题目](https://img-blog.csdnimg.cn/20201010111347127.png#pic_center)
求Household矩阵
最新推荐文章于 2023-12-02 20:55:17 发布