EIGENVALUE

EIGENVALUE calculates eigenvalues of a symmetric matrix.

Usage

eigenvalue gdxin i a gdxout ev

where

gdxin

name of gdxfile with matrix

i

name of set used in matrix

a

name of 2 dimensional parameter inside gdxin

gdxout

name of gdxfile for results (eigenvalues)

ev

name of 1 dimensional parameter inside gdxout

Calculates eigenvalues of symmetric matrix a(i,j) where i and j are aliased sets.

Example

$onText
Eigenvalue example.

octave:1> a=[9 1 1; 1 9 1; 1 1 9]
a =

  9  1  1
  1  9  1
  1  1  9

octave:2> eig(a)
ans =

   8
   8
  11
$offText

Set i / i1*i3 /;

Alias (i,j);

Table a(i,j)
        i1   i2   i3
   i1    9    1    1
   i2    1    9    1
   i3    1    1    9;

Parameter e(i) 'eigenvalues';

execute_unload 'mat.gdx', i, a;
execute '=eigenvalue.exe mat.gdx i a ev.gdx e';
execute_load 'ev.gdx', e;

display a, e;