[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
multiple find
From: |
Claudio Belotti |
Subject: |
multiple find |
Date: |
Thu, 27 Jan 2005 12:44:47 +0100 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041124) |
dear all,
which is the most efficient way to divide a (long) vector in ranges?
I can't think of nothing better than:
ranges = [ 5.5 7.5
7.5 10.5
... ...
50.5 56
56 64
64 72 ]
for ii = 1:rows(ranges)
w = find( v>=ranges(ii,1) & v<ranges(ii,2) );
## do something with indices in w
endfor
Any suggestion on how to avoid the for loop?
thanks
Claudio
-------------------------------------------------------------
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
-------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- multiple find,
Claudio Belotti <=