[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a vector of indices of the largest elements in a vector not exceeding the elements of some other vector
- Subject: Re: a vector of indices of the largest elements in a vector not exceeding the elements of some other vector
- From: Reimar Bauer <r.bauer(at)fz-juelich.de>
- Date: Fri, 13 Jul 2001 09:18:14 +0200
- Newsgroups: comp.lang.idl-pvwave
- Organization: Forschungszentrum Juelich GmbH
- References: <email@example.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:25682
Derek Hullinger wrote:
> I have two vectors of different sizes (say, A and B):
> A contains floating point values that increase with index
> B contains floating point values
> I'd like to create a third vector, C (which would be the same size as
> B) such that:
> The nth element in C contains the index of the largest element in A
> that does not exceed the nth element in B.
> For example:
> because the 0th element in A is the largest value in A that does not
> exceed 12, and the 2nd element in A is the largest value in A that
> does not exceed 37.
> I have found a way to do this if B is a single floating point value
> (not a vector of values):
> but I haven't been able to find a way to do this with a vector B. Any
for some reasons value_locate is the best solution but sometimes not
another routine of our library may be useful.
The difference to value_locate is that your are able to define a window.
We are using this routine by the time synchronisation for means.
Institut fuer Stratosphaerische Chemie (ICG-1)
a IDL library at ForschungsZentrum Juelich
read something about linux / windows