From 3ecc44b542936870da3f2d3aceebbe683a4b8758 Mon Sep 17 00:00:00 2001 From: Willi Mutschler Date: Sun, 26 Jan 2020 16:00:02 +0000 Subject: [PATCH] Fix minimal state space test files for old matlab --- matlab/get_minimal_state_representation.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matlab/get_minimal_state_representation.m b/matlab/get_minimal_state_representation.m index fa2564884..1ce6da53c 100644 --- a/matlab/get_minimal_state_representation.m +++ b/matlab/get_minimal_state_representation.m @@ -253,7 +253,9 @@ function [abar,bbar,cbar,t,k] = ControllabilityStaircaseRosenbrock(a, b, c, tol) for jj = 1 : ra [uj,sj,vj] = svd(bjn1); [rsj,csj] = size(sj); - p = flip(eye(rsj),2); + %p = flip(eye(rsj),2); + p = eye(rsj); + p = p(:,end:-1:1); p = permute(p,[2 1 3:ndims(eye(rsj))]); uj = uj*p; bb = uj'*bjn1;