[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: array cross sections
From: |
Mike Miller |
Subject: |
Re: array cross sections |
Date: |
Tue, 24 Aug 2004 14:33:30 -0500 (CDT) |
On Tue, 24 Aug 2004, John W. Eaton wrote:
| a(find(a<0.5))
I think this should be better:
a(a<0.5)
since it avoids calling find, but it could also end up being slower for
very large matrices since it requires forming an mask array that is the
same size as the original matrix.
| ...and does that require do_fortran_indexing = 1?
No.
Clarification: I believe a(find(a<0.5)) requires that do_fortran_indexing
= 1, while a(a<0.5) works for any value of do_fortran_indexing. That is,
unless something was changed in a very recent version.
Mike
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------