Your matrix is singular (the first two columns are perfectly correlated, so your matrix does not have full rank).
The standard test of singularity is that the determinant cannot be computed (you try to calculate it, and you get zero or a numerical error). This post describes the problem and a shortcut: https://stackoverflow.com/questions/13145948/how-to-find-out-if-a-matrix-is-singular -Alan On 1/19/2021 2:51 PM, Patrick Dupre wrote: > gsl_eigen_nonsymmv_workspace > has no member n_evals > > issue: > > Diagonalizing > double data_3 [] = { 0.0, 0.0, 1.0, > 0.0, 0.0, 0.0, > 0.0, 0.0, 0.0 } ; > > I get > eigenvalue = 0 +0i > eigenvector = > 1 +0i > 0 +0i > 0 +0i > eigenvalue = 0 +0i > eigenvector = > 0 +0i > 1 +0i > 0 +0i > eigenvalue = 0 +0i > eigenvector = > -1 +0i > 0 +0i > 3.00625e-292 +0i > > > which is wrong. > The last eigenvector is not correct because this matrix is not diagonalizable. > > I need to identify such matrices. > > > =========================================================================== > Patrick DUPRÉ | | email: [email protected] > Laboratoire interdisciplinaire Carnot de Bourgogne > 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE > Tel: +33 (0)380395988 > =========================================================================== > > >> Sent: Tuesday, January 19, 2021 at 6:56 PM >> From: "Patrick Alken" <[email protected]> >> To: [email protected] >> Subject: Re: eigensystem >> >> What do you mean by handle it? According to the documentation, if the >> function cannot compute all eigenvalues, an error code is returned. In >> the case of gsl_eigen_nonsymm, the number of converged eigenvalues is >> stored in w->n_evals. >> >> Patrick >> >> On 1/19/21 10:33 AM, Patrick Dupre wrote: >>> Hello, >>> >>> Is there a way to handle the possible error of gsl_eigen_nonsymmv ? >>> >>> For example, when the matrix is not diagonalizable. >>> >>> Thanks >>> >>> =========================================================================== >>> Patrick DUPRÉ | | email: [email protected] >>> Laboratoire interdisciplinaire Carnot de Bourgogne >>> 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE >>> Tel: +33 (0)380395988 >>> =========================================================================== >>> >>> >> >> -- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers http://www.alanmead.org The irony of this ... is that the Internet is both almost-infinitely expandable, while at the same time constrained within its own pre-defined box. And if that makes no sense to you, just reflect on the existence of Facebook. We have the vastness of the internet and yet billions of people decided to spend most of them time within a horribly designed, fake-news emporium of a website that sucks every possible piece of personal information out of you so it can sell it to others. And they see nothing wrong with that. -- Kieren McCarthy, commenting on why we are not all using IPv6
