tutorial (63) riset (62) python (34) machine learning (19) matlab (10) tajuk (10) data minning (8) kriptografi (6) java (4) clustering (3) mysql (3) Steganografi (2) SVM (1) bisnis (1) optimasi (1) pyQT (1) web service (1)

Selasa, 02 September 2014

Mencari Nilai eigen value dan eigen vektor

Untuk mencari eigen, kita dapat menggunakan pustaka JAMA seperti berikut

```       ```

import jama.EigenvalueDecomposition;
import jama.Matrix;

/**
*
* @author www.softscients.web.id
*/
public class DemoJAMA {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
double [][] mat = new double[][]{
{1, 0, 0, 0, 0},
{1, 0,1, 1, 1},
{1, 1, 1, 1, 0},
{1, 1, 1, 1, 0},
{1, 1, 1, 0, 0},
{1, 1, 1, 0, 0}
};
Matrix matrix = new Matrix(mat);
//cari eigen value dan eigen
EigenvalueDecomposition eig = matrix.eig();
//eigen value
double [][] eigenValue = eig.getD().getArrayCopy();
//egien vektor
double [][]eigenVektor = eig.getV().getArrayCopy();

}
}

```
```
Posting Komentar