I have to use the bisection method, and I found something useful in yalmip example "decayrate.m"
I find that every time you are about to use solvesdp, you have to rewrite F, if you'v changed the value of certain parameters in the constraint.
For example, in 'decayrate.m',
t_upper = t_lower*2;
F = [P>=eye(2), A'*P+P*A <= -2*t_upper*P];
ops = sdpsettings('verbose',0,'warning',0);
sol = solvesdp(F,[],ops);
while ~(sol.problem==1)
t_upper = t_upper*2;
F = [P>=eye(2), A'*P+P*A <= -2*t_upper*P];
sol = solvesdp(F,[],ops);
end
If I comment the red part, the program will not work.
There's no problem when F is short, but when F is very long, Repeating F is boring and
make the program hard to read.
Is there any way to solve the problem?