I try to solve P in an equation, P shows up on both sides of the equation. I define other variables as follows.
beta=.95;
r=.95^-1-1;
b=30;
gamma=1;
rho1=1.2;
rho2=-0.3;
Q=1+gamma;
A=[1 0 0 0;0 1 0 0; 0 0 rho1 rho2; 0 0 1 0];
B=[0 1 0 0]';
E=[-b r 1 0]';
H=-E;
R=E'*E;
syms P
eqn=P==R+beta*A'*P*A-(beta*A'*P*B+H')*(Q+beta*B'*P*B)^-1*(beta*B'*P*A+H);
Sp=solve(eqn,P)
But the outcome shows:
Sp =
Empty sym: 0-by-1
Mmmmm What mistake did I make?