diff scripts/plot/private/__scatter__.m @ 10082:28af9aa6f9ed

fix typos in __scatter__
author Jaroslav Hajek <highegg@gmail.com>
date Sun, 10 Jan 2010 22:00:38 +0100
parents 2f435ed48143
children 614ad9e7a17b
line wrap: on
line diff
--- a/scripts/plot/private/__scatter__.m
+++ b/scripts/plot/private/__scatter__.m
@@ -214,13 +214,13 @@
     [xx, idx] = sortrows (x);
     n = rows (x);
     jdx = find (any (xx(1:n-1,:) != xx(2:n,:), 2));
-    jdx(n) = n;
+    jdx(end+1) = n;
     y = xx(jdx,:);
   else
     [xx, idx] = sort (x);
     n = length (x);
     jdx = find (xx(1:n-1,:) != xx(2:n,:));
-    jdx(n) = n;
+    jdx(end+1) = n;
     y = xx(jdx);
   endif