[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Indexing question
From: |
Roberto Hernandez |
Subject: |
Indexing question |
Date: |
Mon, 26 Nov 2001 23:46:34 -0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120 |
Hi all,
When I need to find the first element in a vector that meets a certain
condition I use a combination of "find" and "min".
For example:
a = 0:100;
If I need the first element that is > 20:
min(find(a > 20))
Is there a built-in function that does this? If so I haven't been able
to find it.
TIA,
Roberto
-------------------------------------------------------------
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
-------------------------------------------------------------
- Indexing question,
Roberto Hernandez <=