Math::MatrixDecomposition::Eigen : argument invalide
Bonjour à tous,
j'essaye d'utiliser ce module mais il me renvoie tout le temps "Invalid argument".
La doc (assez peu bavarde) : http://search.cpan.org/~ralph/Math-M...ition/Eigen.pm
Voici un script avec 3 méthodes qui sont toutes un échec :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| use strict;
use Math::Matrix;
use Math::MatrixDecomposition::Eigen;
my $eigen;
my $A11 = 2.;
my $A12 = 1.;
my $A13 = 5.;
my $A22 = 1.;
my $A23 = 7.;
my $A33 = -1.;
#matrice carree symetrique
my @A = ([$A11,$A12,$A13],
[$A12,$A22,$A23],
[$A13,$A23,$A33]);
#essai 1 : utilisation d une reference de @A
$eigen = Math::MatrixDecomposition::Eigen->new(\@A);
#essai 2 : test d une autre forme equivalente
# d apres la doc de Math::MatrixDecomposition::Eigen
$eigen = Math::MatrixDecomposition::Eigen->new;
$eigen->decompose (\@A);
#essai 3 : en passant par Math::Matrix
my $ref_A = new Math::Matrix (@A);
$eigen = Math::MatrixDecomposition::Eigen->new($ref_A); |
merci d'avance pour votre aide