AQB+CQD=E - how to solve for Q?

I am trying to find Q in the following :
AQB+CQD=E
All parameters are matrices (up to 12x12). Q is a 6x6 matrix with all non-diagonal values set to zero. Having a pre-multipler and a post-multiplier is causing me some problems.
I could expand it out into a series of linear equations and then do a linear regression on the results to find the diagonals of Q. However, this is tedious to complete (and therefore prone to error). I suspect there is a suitable MATLAB function that can help me. Any pointers would be very welcome.
Thanks
Matt

3 comentarios

Miro
Miro el 3 de Ag. de 2012
you have to be more accurate concerning your Problem. What is A,B C,D and E? What is known, what unknown?
Star Strider
Star Strider el 3 de Ag. de 2012
Much depends on the structure and condition numbers of your matrices. Never having seen your equation before, the best I can do is refer you to ‘Systems of Linear Equations’ http://www.mathworks.com/help/techdoc/math/f4-983672.html
John Petersen
John Petersen el 3 de Ag. de 2012
Your statement that all parameters are up to 12x12 (I'm assuming you mean A,B,C,D,E), but that Q is 6x6 conflicts with your form of the equation. It helps to know that Q is diagonal, but I reiterate what Miro asks, what are ABCDE? vectors, matrices, what?

Iniciar sesión para comentar.

 Respuesta aceptada

Teja Muppirala
Teja Muppirala el 4 de Ag. de 2012

0 votos

Just making some test data...
A = randn(12,6);
B = randn(6,12);
C = randn(12,6);
D = randn(6,12);
Q_true = diag(randn(6,1));
E = A*Q_true*B + C*Q_true*D;
You can solve it using linear algebra:
M = arrayfun(@(k) reshape((A(:,k) * B(k,:) + C(:,k) * D(k,:)),[],1),1:size(A,2),'uniform',0);
M = cat(2,M{:});
Q_solution = diag(M\E(:))
Or solve it by using FSOLVE:
f = @(q) norm(A*diag(q)*B + C*diag(q)*D - E,'fro')
Q_solution = diag(fsolve(f,zeros(6,1)));

Más respuestas (0)

Categorías

Más información sobre Linear Algebra en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by