Mercurial > hg > octave-jordi
diff src/DLD-FUNCTIONS/find.cc @ 4153:6b96ce9f5743
[project @ 2002-11-06 20:38:49 by jwe]
author | jwe |
---|---|
date | Wed, 06 Nov 2002 20:38:50 +0000 |
parents | ca92c9d3f882 |
children | c0121a3b9cbe |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/find.cc +++ b/src/DLD-FUNCTIONS/find.cc @@ -24,6 +24,8 @@ #include <config.h> #endif +#include "quit.h" + #include "defun-dld.h" #include "error.h" #include "gripes.h" @@ -92,8 +94,12 @@ int i, j; for (j = 0; j < m_nc; j++) for (i = 0; i < m_nr; i++) - if (m (i, j) != 0.0) - count++; + { + OCTAVE_QUIT; + + if (m (i, j) != 0.0) + count++; + } octave_value_list retval (((nargout == 0) ? 1 : nargout), Matrix ()); @@ -108,6 +114,8 @@ for (j = 0; j < m_nc; j++) for (i = 0; i < m_nr; i++) { + OCTAVE_QUIT; + double d = m (i, j); if (d != 0.0) { @@ -131,8 +139,12 @@ int i, j; for (j = 0; j < m_nc; j++) for (i = 0; i < m_nr; i++) - if (m (i, j) != 0.0) - count++; + { + OCTAVE_QUIT; + + if (m (i, j) != 0.0) + count++; + } octave_value_list retval (((nargout == 0) ? 1 : nargout), Matrix ()); @@ -147,6 +159,8 @@ for (j = 0; j < m_nc; j++) for (i = 0; i < m_nr; i++) { + OCTAVE_QUIT; + Complex c = m (i, j); if (c != 0.0) {