Accuracy of complex conjugated eigenvectors computed by eig(A).

Suppose I have a non-symmetric real matrix A, and [V,D]=eig(A) will store the eigenvectors of A in columns of V. The eigenvectors should come with complex conjugated pairs (except for several real eigenvectors) in columns of V. Now for each column of V, I want to find the index of its complex-conjugated column in V. If there are any rounding or truncation errors during the computation of eig(A), I could compensate this error by using ismembertol() like the following:
ConjugatedIndices = cellfun(@(V_i) find(ismembertol(real(V.'),real(conj(V_i.')),'ByRows',true) & ismembertol(imag(V.'),imag(conj(V_i.')),'ByRows',true)), num2cell(V,1))
However, ismembertol() is quite new and not recognized by some old version of MATLAB, and it may have some performance drawbacks. So I'm wondering if I can just use the exact ismember() for this purpose. But I'm not sure if the complex-conjugated column pairs in V are always EXACTLY complex-conjugated, so that I don't need to use the new and maybe slower ismembertol().
Thanks in advance!

Answers (1)

Take a look at the cplxpair function.

1 Comment

Thanks for this information. But I need to keep the original order without sorting.

Sign in to comment.

Categories

Products

Asked:

on 23 Feb 2017

Commented:

on 24 Feb 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!