案例1 给出4个弹簧的劲度系数,离散后,求其总的刚度矩阵. 代码: import numpy as np k1, k2, k3, k4 = 500, 250, 2000, 1000 ki = np.array([k1, k2, k3, k4]) p = 1000 K = np.matrix(np.zeros((4, 4))) eindex = [K[0:2, 0:2], K[1:3, 1:3], K[0:3:2, 0:3:2], K[2:, 2:]] for i in range(4): ke…