Python Numpy np.legcompanion()方法
np.legcompanion() 方法用于返回legendre系列的伴生矩阵。
语法: np.legcompanion(c)
参数:
c : [array_like] 从低到高排序的 legendre 系列系数的一维数组。
返回: [ndarray] 伴生矩阵的尺寸(deg, deg)。
代码#1:
输出:
代码#2:
输出:
np.legcompanion() 方法用于返回legendre系列的伴生矩阵。
语法: np.legcompanion(c)
参数:
c : [array_like] 从低到高排序的 legendre 系列系数的一维数组。
返回: [ndarray] 伴生矩阵的尺寸(deg, deg)。
代码#1:
输出:
代码#2:
输出: