eig
Eigenvalues and eigen vectors of matrices.
e=eig(x)
(c,em)=eig(x)
e=eig(x,y)
(c,em)=eig(x,y)
Inputs
x A square matrix.
y A square matrix of the same size as x .
Outputs
e The vector of eigenvalues of x or the pair (x,y) .
c The matrix of eigenvectors of x or the pair (x,y) .
em The diagonal matrix of the eigenvalues of x or the pair (x,y) .


Description
The outputs c and em are the same size as the input. For a single input, the outputs satisfy
    x*c=c*em.
For two inputs (the generalized eigenvalue problem), the outputs satisfy
    x*c=y*c*em.







Example
>>a=complexRandn(4,4)*20;
>>a
Columns 1 through 3
    1.3626 -  1.8973i     -29.0985 - 15.5639i      -9.8520 - 29.8157i   
    5.2219 -  4.5395i       0.2512 + 31.0335i       1.4211 + 23.2440i   
    8.7877 + 32.4650i      -4.9224 +  4.0209i      -9.1028 +  6.2764i   
  -12.9227 + 12.1951i     -18.6741 +  8.0302i       4.9407 +  4.6863i   
Column 4
   -4.9716 +  1.2286i   
    4.1932 - 17.4782i   
   -0.2930 -  1.7962i   
    1.1016 -  9.7947i   

>>[c,d]=eig(a)
>>c
Columns 1 through 3
   -0.6817 +  0.0856i      -0.0065 -  0.3599i       0.1534 -  0.3038i   
    0.1128 +  0.0040i       0.4263 -  0.2789i      -0.5195 +  0.3526i   
   -0.0482 -  0.5456i      -0.2392 +  0.3718i      -0.1486 -  0.5850i   
    0.2496 -  0.3912i       0.1430 -  0.6285i      -0.3061 -  0.1786i   
Column 4
    0.0698 +  0.2114i   
    0.1790 -  0.5785i   
    0.3084 +  0.4977i   
    0.4902 +  0.0226i   

>>d
Columns 1 through 3
   31.2217 -  8.7005i            0 +       0i            0 +       0i   
         0 +       0i     -21.3899 - 11.3147i            0 +       0i   
         0 +       0i            0 +       0i     -12.5804 + 26.1101i   
         0 +       0i            0 +       0i            0 +       0i   
Column 4
         0 +       0i   
         0 +       0i   
         0 +       0i   
   -3.6388 + 19.5231i   

>>norm(a*c-c*d)
      1.1802e-013
>>a=rand(4,4)
>>b=rand(4,4)
>>[c,d]=eig(a,b)
>>norm(a*c-b*c*d)
      2.6940e-015