Fast solution of quadratic matrix equation
12 views (last 30 days)
Show older comments
Umer Abdullah
on 29 Dec 2017
Commented: Umer Abdullah
on 31 Dec 2017
Hi everyone,
I have a quadratic matrix equation of the form XCX+X+D=0. Currently I am solving it using the code kindly provided at https://www.mathworks.com/matlabcentral/fileexchange/26956-solve-bilateral-matrix-quadratic-equation . Since I have to perform this operation repetitively, my code (which involves multiple calls to this function) takes around an hour to run. I'm running a parallel pool but I'm limited by the number of cores.
I was wondering if there is any faster way of solving the equation?
Thanks
5 Comments
Jan
on 30 Dec 2017
@Umer: Can you provide a working version with some test input? I tried it with sylvester, but it did not converge.
Accepted Answer
David Goodmanson
on 30 Dec 2017
Hi Umer,
If matrix C is well behaved enough, meaning not too large a condition number, then the following might work
[v lambda] = eig(D*C,'vector');
r = (-1 + sqrt(1-4*lambda))/2;
x = (v*diag(r))/(C*v);
For 5 million calls, all 50x50, this would take about 4 hours on my pc, but I only have the one processor.
For an NxN matrix there are lots of solutions, since for the + sign in front of the sqrt you have an independent choice of +- for each element of lambda, so 2^N in all.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!