summaryrefslogtreecommitdiff
path: root/abcd_free_space.m
diff options
context:
space:
mode:
authorMatt Argao <mcargao@email.wm.edu>2012-11-13 17:19:30 -0500
committerMatt Argao <mcargao@email.wm.edu>2012-11-13 17:19:30 -0500
commit3b646295bcd15f2b576c11b0f4b6557ec0e13023 (patch)
tree4929fd04677a772c7ffb174a799ead2625195b66 /abcd_free_space.m
parent43599adb04a9fa70d942a8fd30d42ddccbc97718 (diff)
downloadmode_match-3b646295bcd15f2b576c11b0f4b6557ec0e13023.tar.gz
mode_match-3b646295bcd15f2b576c11b0f4b6557ec0e13023.zip
function is array friendly now
Diffstat (limited to 'abcd_free_space.m')
-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