diff options
Diffstat (limited to 'getSection.m')
-rw-r--r-- | getSection.m | 7 |
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 |