LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
QBD_NI_Sylvest.m
1function X=QBD_NI_Sylvest(A,B,C,D)
2% this function solves the equation AXB+CX=D
3% using a complex schur and a hessenberg-triangular decomposition
4
5 [LBAR,NBAR,W,V]=hess(A,C);
6 %W*A*V = LBAR, W*C*V = NBAR
7 [U,T]=schur(B,'complex');
8 %U'*T*U = B
9 F=W*D*U;
10
11 n=size(F,2);
12
13 Y=[];
14 tempmat=zeros(n,n-1);
15 for k=1:n
16 if (k==1)
17 temp=F(:,k);
18 else
19 tempmat(:,k-1)=-LBAR*Y(:,k-1);
20 temp=F(:,k)+sum(tempmat(:,1:k-1).*kron(ones(n,1),T(1:k-1,k).'),2);
21 end
22 Y(:,k)=(NBAR+T(k,k)*LBAR)\temp;
23 % MATLAB checks that NBAR+T(k,k)*LBAR is an hessenberg
24 % matrix and quickly reduces it to a triangular one which is
25 % solved by backward substitution (TEST 6)
26 end
27 X=real(V*Y*U');