Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to figure 'matrix coupling' out?

Subject: How to figure 'matrix coupling' out?

From: flying

Date: 14 Apr, 2012 03:34:28

Message: 1 of 4

Hi,everyone!I have a question for you.
I have two 4x4 complex matrices.

Ar = 1.2485 + 0.1236i 0.0320 - 0.1570i 0.0245 + 0.0153i 0.0184 - 0.0097i
    -0.0041 - 0.1868i 0.8390 + 0.5215i 0.1207 + 0.0593i -0.0008 + 0.1226i
    -0.0604 - 0.0353i 0.0097 - 0.1781i 0.1500 + 0.9788i 0.0425 - 0.0036i
    0.0172 - 0.0026i -0.0864 + 0.0996i -0.0423 - 0.0094i 0.9084 + 0.3718i

Ac = 0.8987 + 0.6650i 0.0302 - 0.0282i -0.0035 + 0.0219i -0.0146 - 0.0581i
      0.0328 - 0.0334i 0.7194 + 0.6143i 0.1217 + 0.1499i -0.0790 + 0.1035i
     -0.0215 - 0.0325i 0.1310 - 0.2428i -0.4942 + 0.8434i -0.0291 + 0.0318i
      0.0256 - 0.0727i -0.1420 + 0.0203i 0.0053 + 0.0046i 0.6475 + 0.7799i

I want to reorder their eigenvalues.First,i do eigenvalue decomposition of
matrix 'Ar'signing as 'lambdaAr'.It is a vector.

lambdaAr = [1.2190 + 0.0767i 0.9510 + 0.3090i 0.8505 + 0.6179i 0.1253 + 0.9921i];
lambdaAc = [-0.5358 + 0.8443i 0.5878 + 0.8090i 0.8941 + 0.6496i 0.8254 + 0.5997i];

My question is that i want to reorder matrix Ac's eigenvalues 'lambdaAc' corresponding to the order of 'lambdaAr'.
Maybe it is a question of 'matrix coupling'.
How can i do?Please do me a favor everybody.Thank you very much!

Subject: How to figure 'matrix coupling' out?

From: Roger Stafford

Date: 14 Apr, 2012 05:44:27

Message: 2 of 4

"flying" wrote in message <jmar84$2ah$1@newscl01ah.mathworks.com>...
> Hi,everyone!I have a question for you.
> I have two 4x4 complex matrices.
>
> Ar = 1.2485 + 0.1236i 0.0320 - 0.1570i 0.0245 + 0.0153i 0.0184 - 0.0097i
> -0.0041 - 0.1868i 0.8390 + 0.5215i 0.1207 + 0.0593i -0.0008 + 0.1226i
> -0.0604 - 0.0353i 0.0097 - 0.1781i 0.1500 + 0.9788i 0.0425 - 0.0036i
> 0.0172 - 0.0026i -0.0864 + 0.0996i -0.0423 - 0.0094i 0.9084 + 0.3718i
>
> Ac = 0.8987 + 0.6650i 0.0302 - 0.0282i -0.0035 + 0.0219i -0.0146 - 0.0581i
> 0.0328 - 0.0334i 0.7194 + 0.6143i 0.1217 + 0.1499i -0.0790 + 0.1035i
> -0.0215 - 0.0325i 0.1310 - 0.2428i -0.4942 + 0.8434i -0.0291 + 0.0318i
> 0.0256 - 0.0727i -0.1420 + 0.0203i 0.0053 + 0.0046i 0.6475 + 0.7799i
>
> I want to reorder their eigenvalues.First,i do eigenvalue decomposition of
> matrix 'Ar'signing as 'lambdaAr'.It is a vector.
>
> lambdaAr = [1.2190 + 0.0767i 0.9510 + 0.3090i 0.8505 + 0.6179i 0.1253 + 0.9921i];
> lambdaAc = [-0.5358 + 0.8443i 0.5878 + 0.8090i 0.8941 + 0.6496i 0.8254 + 0.5997i];
>
> My question is that i want to reorder matrix Ac's eigenvalues 'lambdaAc' corresponding to the order of 'lambdaAr'.
> Maybe it is a question of 'matrix coupling'.
> How can i do?Please do me a favor everybody.Thank you very much!
- - - - - - - - -
  The two sets of eigenvalues of Ar and Ac are perfectly arbitrary, depending as they do on the complex contents of these matrices, so in effect you are asking how to reorder one arbitrary set of four points in the complex plane so as to best "correspond" to another arbitrary set of four.

  Can you describe what you would like to see in such a correspondence? I can think of criteria such as to minimize the sum of the Euclidean distances between corresponding pairs, or perhaps the sum of the squares of these distances. There must be many ways of finding a "best" correspondence among the 24 possibilities, but it is up to you to tell us what it is you want in this respect. We can't read your mind.

Roger Stafford

Subject: How to figure 'matrix coupling' out?

From: flying

Date: 14 Apr, 2012 07:15:44

Message: 3 of 4

Thank you for your enthusiastic reply!
Actually,what you said is what i want to find.Just like you said 'how to reorder one arbitrary set of four points in the complex plane so as to best "correspond" to another arbitrary set of four'.So i can restore four eigenvalue pairs from the complex plane.


One method is like this:

[Mr lambdaAr] = eig(Ar); % Eigenvalues of Ar
Arc =inv(Mr)*Ac*Mr;
lambdaAc = eig(Ac); % eigenvalues of Ac
px = angle(diag(lambdaAr)); % location of scatterers in x-axis

[Y I] = sort(angle(diag(Arc)));
[Y1 I1] = sort(I);
[Y2 I2] = sort(angle(lambdaAc));
py = Y2(I1); % location of scatterers in y-axis
figure
plot(px,py,'*'); % plot eigenvalue pairs

but i find that sometimes it woks well, it can pair the correct eigenvalues,but sometimes it fails.

Sincerely frank




"Roger Stafford" wrote in message <jmb2rr$19m$1@newscl01ah.mathworks.com>...
> "flying" wrote in message <jmar84$2ah$1@newscl01ah.mathworks.com>...
> > Hi,everyone!I have a question for you.
> > I have two 4x4 complex matrices.
> >
> > Ar = 1.2485 + 0.1236i 0.0320 - 0.1570i 0.0245 + 0.0153i 0.0184 - 0.0097i
> > -0.0041 - 0.1868i 0.8390 + 0.5215i 0.1207 + 0.0593i -0.0008 + 0.1226i
> > -0.0604 - 0.0353i 0.0097 - 0.1781i 0.1500 + 0.9788i 0.0425 - 0.0036i
> > 0.0172 - 0.0026i -0.0864 + 0.0996i -0.0423 - 0.0094i 0.9084 + 0.3718i
> >
> > Ac = 0.8987 + 0.6650i 0.0302 - 0.0282i -0.0035 + 0.0219i -0.0146 - 0.0581i
> > 0.0328 - 0.0334i 0.7194 + 0.6143i 0.1217 + 0.1499i -0.0790 + 0.1035i
> > -0.0215 - 0.0325i 0.1310 - 0.2428i -0.4942 + 0.8434i -0.0291 + 0.0318i
> > 0.0256 - 0.0727i -0.1420 + 0.0203i 0.0053 + 0.0046i 0.6475 + 0.7799i
> >
> > I want to reorder their eigenvalues.First,i do eigenvalue decomposition of
> > matrix 'Ar'signing as 'lambdaAr'.It is a vector.
> >
> > lambdaAr = [1.2190 + 0.0767i 0.9510 + 0.3090i 0.8505 + 0.6179i 0.1253 + 0.9921i];
> > lambdaAc = [-0.5358 + 0.8443i 0.5878 + 0.8090i 0.8941 + 0.6496i 0.8254 + 0.5997i];
> >
> > My question is that i want to reorder matrix Ac's eigenvalues 'lambdaAc' corresponding to the order of 'lambdaAr'.
> > Maybe it is a question of 'matrix coupling'.
> > How can i do?Please do me a favor everybody.Thank you very much!
> - - - - - - - - -
> The two sets of eigenvalues of Ar and Ac are perfectly arbitrary, depending as they do on the complex contents of these matrices, so in effect you are asking how to reorder one arbitrary set of four points in the complex plane so as to best "correspond" to another arbitrary set of four.
>
> Can you describe what you would like to see in such a correspondence? I can think of criteria such as to minimize the sum of the Euclidean distances between corresponding pairs, or perhaps the sum of the squares of these distances. There must be many ways of finding a "best" correspondence among the 24 possibilities, but it is up to you to tell us what it is you want in this respect. We can't read your mind.
>
> Roger Stafford

Subject: How to figure 'matrix coupling' out?

From: Roger Stafford

Date: 14 Apr, 2012 18:41:41

Message: 4 of 4

"flying" wrote in message <jmb870$lgj$1@newscl01ah.mathworks.com>...
> Thank you for your enthusiastic reply!
> Actually,what you said is what i want to find.Just like you said 'how to reorder one arbitrary set of four points in the complex plane so as to best "correspond" to another arbitrary set of four'.So i can restore four eigenvalue pairs from the complex plane.
>
> One method is like this:
>
> [Mr lambdaAr] = eig(Ar); % Eigenvalues of Ar
> Arc =inv(Mr)*Ac*Mr;
> lambdaAc = eig(Ac); % eigenvalues of Ac
> px = angle(diag(lambdaAr)); % location of scatterers in x-axis
>
> [Y I] = sort(angle(diag(Arc)));
> [Y1 I1] = sort(I);
> [Y2 I2] = sort(angle(lambdaAc));
> py = Y2(I1); % location of scatterers in y-axis
> figure
> plot(px,py,'*'); % plot eigenvalue pairs
>
> but i find that sometimes it woks well, it can pair the correct eigenvalues,but sometimes it fails.
>
> Sincerely frank
- - - - - - - - - -
  Frank, you are attempting to use the eigenvectors of Ar in your method, but I don't see that these have anything to do with matching up eigenvalues. You can take any arbitrary set of n mutually orthogonal complex unit vectors and combine them with any set of n complex numbers and form the matrix for which these are the respective eigenvectors and eigenvalues. The former have nothing inherent to do with the latter.

  Also you didn't answer the question I posed. I will repeat it in different words. How do you define "correspond" in this context? What is your idea of a best pairing between two arbitrary sets of four complex values? What quantitative measurement would establish that one pairing is superior to another? This is a question about what you have in mind for your problem. There are clearly arrangements in which such a best pairing would be obvious to anyone, but on the other hand there are many more situations where the "best" would depend very much on how you define the concept. When writing programs such as matlab one needs to be able to handle all situations that might arise, and that requires precise definitions.

Roger Stafford

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us