diff scripts/general/postpad.m @ 5459:ff40c78cebf0

[project @ 2005-09-20 19:18:34 by jwe]
author jwe
date Tue, 20 Sep 2005 19:18:35 +0000
parents 4c8a2e4e0717
children 34f96dd5441b
line wrap: on
line diff
--- a/scripts/general/postpad.m	Mon Sep 19 19:29:32 2005 +0000
+++ b/scripts/general/postpad.m	Tue Sep 20 19:18:35 2005 +0000
@@ -57,13 +57,16 @@
     endif
   endif
 
-  if (! ismatrix (x))
-    error ("first argument must be a vector or matrix");
-  elseif (! isscalar (l) || l < 0)
+  if (! isscalar (l) || l < 0)
     error ("second argument must be a positive scaler");
   endif
 
+  if (dim > nd)
+    sz(nd+1:dim) = 1;
+  endif
+
   d = sz (dim);
+
   if (d >= l)
     idx = cell ();
     for i = 1:nd