Solve Function Doesn't Give All Solutions
2 views (last 30 days)
Show older comments
% this does not give all the solutions
A = [0.7 0.2;
0.05 0.64];
C = [0.5 -0.8;
0 0.7];
Q = [0.5 0;
0 0.7];
R = [1 0;
0 0.8];
T = sym('T',[2 2]);
L = sym('L',[2 2]);
[Pba,L2,G] = dare(A',C',Q,R);
P = C*Pba*C'+R;
f = trace(P^(-1)*(T*P*T'+L-P));
x = solve(f,[T,L])
The answer(solution) is like that:
x =
struct with fields:
T1_1: 0
T2_1: 0
T1_2: 0
T2_2: 0
L1_1: 1298074214633706853141718390451145/425558238297866865348786096439296
L2_1: 0
L1_2: 0
L2_2: 0
However, there are other solutions, such as T=[1,0;0,1], L=[0,0;0,0];
Why does the code not give me all the reasonable solutions for T and L?
Thanks!
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!