changeset 18672:3994a1c2b994 stable

spy.m: Use nnz, not numel, to avoid overflowing octave_idx_type (bug #42116). spy.m: Use nnz, not numel, to avoid overflowing octave_idx_type (bug #42116).
author Rik <rik@octave.org>
date Thu, 24 Apr 2014 09:22:38 -0700
parents 01aa90ece9a4
children 7bccc182e2f7
files scripts/sparse/spy.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/sparse/spy.m	Wed Apr 23 22:40:24 2014 -0700
+++ b/scripts/sparse/spy.m	Thu Apr 24 09:22:38 2014 -0700
@@ -34,7 +34,7 @@
   endif
 
   markersize = NaN;
-  if (numel (x) < 1000)
+  if (nnz (x) < 1000)
     line_spec = "*";
   else
     line_spec = ".";