I have th following Matlab-Yalmip code:
P=cell(1+m*2,1)
for i=1:m*2+1
P{i}=sdpvar(n);
end
phi=cell(1+m*2,1);
for i=1:m*2+1
phi{i} = A'*P{i}+P{i}*A;
end
for i=1:m*2
phi{i} = phi{i}+(i)*P{i+1};
end
I Try to construct the following banded Matrix with Matlab:
$ Phi = left(begin{array}{cccccc}
phi_{0} & frac{1}{2}phi_{1} & 0_{n} & ldots & ldots &0_{n}\
frac{1}{2}phi_{1} & phi_{2} & frac{1}{2}phi_{3} & ddots & &vdots \
0_{n} & frac{1}{2}phi_{3} & ddots & ddots & ddots&vdots\
vdots& ddots & ddots & ddots & ddots& 0_{n}\
vdots& & ddots & ddots & phi_{2m-2} & frac{1}{2}phi_{2m-1}\
0_{n} & ldots& ldots & 0_{n} & frac{1}{2}phi_{2m-1}&L_{2m}\
end{array}
right)_{(m+1)ntimes(m+1)n}$
Please, Can you help me hwo efficently construct $Phi$