modalMor (Issue #24): Updated test if eigenvectors belong to the same eigenvalue to be more robust.
modalMor (Issue #24): Updated test if eigenvectors belong to the same eigenvalue to be more robust.

According to the Matlab documentation of eigs, an option 'tol' can be passed to eigs:
Parameter: opts.tol
Description: Convergence: Ritz estimate residual <= tol*norm(A).
Values: [scalar | {eps}]

To make sure, that the residual is smaller than 1e3*eps, a tolerance opt.tol=1e3*eps/norm(A) is passed to the function.

Then the norm of the Ritz residual (r=Ax-lambda*x) of the left eigenvector equation with the right eigenvector (A.'*w-rlambda*sys.E.'*w) is calculated
-> if the left eigenvector equals the right eigenvector, the residual should be smaller as the tolerance  (1e3*eps*norm(A)).

This test has to be performed separately for each eigenvalue.

MORLab/sssMOR