summaryrefslogtreecommitdiffstats
path: root/templates/compute_minRPI.m
diff options
context:
space:
mode:
Diffstat (limited to 'templates/compute_minRPI.m')
-rw-r--r--templates/compute_minRPI.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/compute_minRPI.m b/templates/compute_minRPI.m
index 37a6dbb..19df517 100644
--- a/templates/compute_minRPI.m
+++ b/templates/compute_minRPI.m
@@ -18,6 +18,7 @@ function [H_tube,h_tube,n_iter] = compute_minRPI(K_tube,params)
n_iter = 0;
Hw = params.constraints.DisturbanceMatrix;
hw = params.constraints.DisturbanceRHS;
+ W = Polyhedron('A',Hw,'b',hw);
while true
omega_last = copy(omega);
% display(n_iter)
@@ -25,7 +26,7 @@ function [H_tube,h_tube,n_iter] = compute_minRPI(K_tube,params)
% b_last = omega.b;
display(n_iter);
display(omega.b)
- omega = omega.plus(Polyhedron('A',Hw*inv(A^(n_iter+1)),'b',hw));
+ omega = omega.plus(A^(n_iter)*W);
if eq(omega.minHRep(),omega_last.minHRep())
% if eq(omega,omega_last)