changeset 12675:2e9cf640379b stable

trapz.m, cumtrapz.m: Quote ':' in initialization statement to prevent it being interpreted as colon operator. * trapz.m cumtrapz.m: Quote ':' in initialization statement.
author Rik <octave@nomad.inbox5.com>
date Sun, 15 May 2011 09:40:26 -0700
parents f83ec5ab90ad
children bedd0cdb3584
files scripts/general/cumtrapz.m scripts/general/trapz.m
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/general/cumtrapz.m
+++ b/scripts/general/cumtrapz.m
@@ -83,7 +83,7 @@
   endif
 
   n = sz(dim);
-  idx1 = idx2 = repmat ({:}, [nd, 1]);
+  idx1 = idx2 = repmat ({':'}, [nd, 1]);
   idx1{dim} = 2 : n;
   idx2{dim} = 1 : (n - 1);
 
--- a/scripts/general/trapz.m
+++ b/scripts/general/trapz.m
@@ -97,7 +97,7 @@
   endif
 
   n = sz(dim);
-  idx1 = idx2 = repmat ({:}, [nd, 1]);
+  idx1 = idx2 = repmat ({':'}, [nd, 1]);
   idx1{dim} = 2 : n;
   idx2{dim} = 1 : (n - 1);