summaryrefslogtreecommitdiff
path: root/getSection.m
diff options
context:
space:
mode:
authorJoe Zhao <ztuowen@gmail.com>2015-05-15 18:18:59 +0800
committerJoe Zhao <ztuowen@gmail.com>2015-05-15 18:18:59 +0800
commit81d9c2360fd88422fcf7c8bd176f0ae07af2a9bf (patch)
treebae7b6f5ded34e5d9e5244b3e51861620c9b64a4 /getSection.m
parentc02789c3194059233b275a2de76c33f5456f0a11 (diff)
downloadfeatext-81d9c2360fd88422fcf7c8bd176f0ae07af2a9bf.tar.gz
featext-81d9c2360fd88422fcf7c8bd176f0ae07af2a9bf.tar.bz2
featext-81d9c2360fd88422fcf7c8bd176f0ae07af2a9bf.zip
updated range
Diffstat (limited to 'getSection.m')
-rw-r--r--getSection.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/getSection.m b/getSection.m
new file mode 100644
index 0000000..a5addc3
--- /dev/null
+++ b/getSection.m
@@ -0,0 +1,7 @@
+function [sec] = getSection(inp,a,b)
+ [m,n] = size(inp);
+ ste = (m-1)/b;
+ st=1+ceil(ste*(a-1));
+ ed=1+floor(ste*a);
+ sec = inp(st:ed,:);
+end \ No newline at end of file