matrix_power 函数
将方阵提升到整数次幂。
语法
matrix_power(matrix, exponent)MatrixPower(matrix, exponent)
参数与选项
matrix | 表示矩阵的嵌套列表。 |
|---|---|
exponent | 整数指数;负数指数要求矩阵可逆。 |
示例
- 矩阵整数幂
MatrixPower([[1, 1], [0, 1]], 3)返回 [[1, 3], [0, 1]]。
将方阵提升到整数次幂。
matrix_power(matrix, exponent)MatrixPower(matrix, exponent)matrix | 表示矩阵的嵌套列表。 |
|---|---|
exponent | 整数指数;负数指数要求矩阵可逆。 |
MatrixPower([[1, 1], [0, 1]], 3)返回 [[1, 3], [0, 1]]。