I
I
Ilya2013-12-11 14:11:00
Java
Ilya, 2013-12-11 14:11:00

How can you calculate a vector and numbers using JAMA?

Hello! Question with the following: there is a matrix, you need to find its eigenvectors and numbers. All this happens in JAVA . There is a JAMA
library in it, it SHOULD be possible to read this data. But I didn't find it in the documentation. Please tell me how you can calculate the vector and numbers using JAMA, or tell me some other libraries. Thank you for your attention :-) en.wikipedia.org/wiki/JAMA_ (library) math.nist.gov/javanumerics/jama

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Glebov, 2013-12-13
@rpsv

According to the docks it looks like this

Matrix matrix = new Matrix(10, 10);
Random random = new Random();

for(int i = 0; i < 10; i++)
    for(int j = 0; j < 10 ; j++) 
       matrix.set(i, j, random.nextDouble());
           

EigenvalueDecomposition eig = matrix.eig();

// Собственные вектора
Matrix v = eig.getV();

// Реальная часть собственных значений
double[] realEigenvalues = eig.getRealEigenvalues();
        
// Мнимая часть собственных значений 
double[] imagEigenvalues = eig.getImagEigenvalues();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question