changeset 1644:1ca1a9d4c886 octave-forge

support column vector padsize
author jmones
date Sun, 15 Aug 2004 19:21:50 +0000
parents d303cda223da
children 7aeb92a5e784
files main/image/padarray.m
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/main/image/padarray.m	Sun Aug 15 19:01:05 2004 +0000
+++ b/main/image/padarray.m	Sun Aug 15 19:21:50 2004 +0000
@@ -81,6 +81,9 @@
     error("padarray: padsize must be a vector of positive integers.");
   endif
 
+  ## Assure padsize is a row vector
+  padsize=padsize(:).';
+
   # Check direction
   pre=false;
   post=false;
@@ -263,6 +266,9 @@
 %!assert(padarray([1,2],[0,1],i,'post'), [1,2,i]);
 %!assert(padarray([1,2],[0,1],i,'both'), [i,1,2,i]);
 
+% Test vertical padsize
+%!assert(padarray([1,2],[0;1],i,'both'), [i,1,2,i]);
+
 % Test circular padding
 %!test
 %! A=[1,2,3;4,5,6];
@@ -294,6 +300,9 @@
 
 %
 % $Log$
+% Revision 1.3  2004/08/15 19:21:50  jmones
+% support column vector padsize
+%
 % Revision 1.2  2004/08/11 15:04:59  pkienzle
 % Convert dos line endings to unix line endings
 %