From bf880f0243ee69ea1c49202f642ba0aefe841f11 Mon Sep 17 00:00:00 2001 From: Venkatraman Renganathan <venkat@control.lth.se> Date: Mon, 13 Nov 2023 11:33:55 +0000 Subject: [PATCH] Upload New File --- CheckRiccatiSolution.m | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 CheckRiccatiSolution.m diff --git a/CheckRiccatiSolution.m b/CheckRiccatiSolution.m new file mode 100644 index 0000000..f72463e --- /dev/null +++ b/CheckRiccatiSolution.m @@ -0,0 +1,7 @@ +function diff = CheckRiccatiSolution(A, B, Q, R, P) +% CheckRiccatiSolution checks if P is solution to idare + +diff = A'*P*A + Q - A'*P*B*inv(R + B'*P*B)*B'*P*A - P; + +end + -- GitLab