My error e is surpose to converge to zero an remain there and the contract C is suppose to converge to 1 and remain there. But mine converges and later starts increasing
function dPdt = mRiccati(t,P, B, Q, R)
%computes Phi
P = reshape(P, size(Q)); % Convert from "n^2"-by-1 to "n"-by-"n"
dPdt = -Q + P' * B * R^-1 * B.' * P; % Determine derivative
dPdt = dPdt(:); % Convert from "n"-by-"n" to "n^2"-by-1 or converting to column vector
end
function dhdt =...
Laplacian of the function V(x,t)=-1/2* x' D x + h' *x - Z
x is a vector D is a matrix which depends on time h is a vector which depends on time Z is also a vector depends on time