summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--abcd_free_space.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/abcd_free_space.m b/abcd_free_space.m
index d7b5952..d260d7d 100644
--- a/abcd_free_space.m
+++ b/abcd_free_space.m
@@ -1,6 +1,12 @@
function fs_abcd = abcd_free_space( distance)
% abcd matrix for the free space region of given distance
- fs_abcd=[1, distance; 0,1];
+if (length(distance) == 1)
+ fs_abcd=[1, distance; 0,1];
+else
+ for i=length(distance):-1:1
+ fs_abcd{i}=[1, distance(i); 0,1];
+ end
+end
end