summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorSunil Shetye2018-07-27 17:02:30 +0530
committerSunil Shetye2018-07-27 17:11:06 +0530
commitfdb4e7f20ed06ddcefa8d9079ab45872f81f95bf (patch)
tree9472a44d44b617361f5ce02cd482c56aa288ea27 /macros
parentffed8ae73e782a7d7d7d37b0e40537b1cc5796f0 (diff)
downloadFOSSEE-Signal-Processing-Toolbox-fdb4e7f20ed06ddcefa8d9079ab45872f81f95bf.tar.gz
FOSSEE-Signal-Processing-Toolbox-fdb4e7f20ed06ddcefa8d9079ab45872f81f95bf.tar.bz2
FOSSEE-Signal-Processing-Toolbox-fdb4e7f20ed06ddcefa8d9079ab45872f81f95bf.zip
handle singleton case
Diffstat (limited to 'macros')
-rw-r--r--macros/prepad.sci3
1 files changed, 3 insertions, 0 deletions
diff --git a/macros/prepad.sci b/macros/prepad.sci
index 52d9746..4e517f8 100644
--- a/macros/prepad.sci
+++ b/macros/prepad.sci
@@ -51,6 +51,9 @@ function y = prepad (x, l, c, dim)
if (argn(2) < 4)
// Find the first non-singleton dimension.
dim = find (sz > 1, 1)
+ if (dim == [])
+ dim = 1
+ end
else
if (~(isscalar (dim) & dim == fix (dim) & dim >= 1))
error ("prepad: DIM must be an integer and a valid dimension");