- PHP 手册
- 函数参考
- 数学扩展
- Lapack
- Lapack
Lapack::eigenValues
(PECL lapack >= 0.1.0)
Lapack::eigenValues — This function returns the eigenvalues for a given square matrix
说明
public static Lapack::eigenValues ( array$a
[, array $left
[, array $right
]] ) : array
Calculate the eigenvalues for a square matrix, and optionally calculate the left and right eigenvectors.
参数
-
a
-
The matrix to calculate the eigenvalues for.
-
left
-
Optional parameter - if an array is passed here, it will be filled with the left eigenvectors
-
right
-
Optional parameter - if an array is passed here, it will be filled with the right eigenvectors
返回值
Returns an array of arrays representing the eigenvalues for the array.
范例
Example #1 Using Lapack::eigenValues():
<?php
$a = array(
array(-1.01, 0.86, -4.60, 3.31, -4.81 ),
array( 3.98, 0.53, -7.04, 5.29, 3.55 ),
array( 3.30, 8.26, -3.89, 8.20, -1.51 ),
array( 4.43, 4.96, -7.66, -7.33, 6.18 ),
array( 7.31, -6.43, -6.16, 2.47, 5.58 ),
);
$result = Lapack::eigenValues($a);
?>
User Contributed Notes
There are no user contributed notes for this page.官方地址:https://www.php.net/manual/en/lapack.eigenvalues.php