(PECL lapack >= 0.1.0)
Lapack::eigenValues — This function returns the eigenvalues for a given square matrix
$a
[, array $left
[, array $right
]] )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.
Przykład #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);
?>