i need to solved for different values of gama until its lowest value, which gives a positive definite solution for P is found, so i am using all(eig(P)>0) like the equation below:
is this right?
gama=100000;for i=1:2000; P = inv(inv(P)+M'*inv(R)*M-gama^(-2)*eye(4)); E=eig(P_cov); if all(eig(P))>0) %%(all eigenvalues must be positive)
gama=gama/2; else break; end endP = inv(inv(P)+M'*inv(R)*M-gama^(-2)*eye(4));
is this correct?
Best Answer