comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Compare two variables
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Compare two variables [message #61277 is a reply to message #61276] Mon, 14 July 2008 04:57 Go to previous messageGo to previous message
ben.bighair is currently offline  ben.bighair
Messages: 221
Registered: April 2007
Senior Member
On Jul 14, 4:09 am, Joost Aan de Brugh <joost...@gmail.com> wrote:
> Hello Dave,
>
>> hi Joost
>> but i work with float data. as you said this metheod works for
>> integer. could we modify it to work for non integer data?
>> Cheers
>> Dave
>
> That is a pity. But isn't that dangerous in any case. If A and B are
> floats then the expression A eq B is not reliable because of
> continuous rounding. It may still be reliable if absolutely no
> arithmetic is involved.
>
> The compression trick does not work for floats, because of the degree
> of infinity.
>
> Maybe a two-step filtering is apropriate
>
> idx1 = Where(B[2,*] = A[0,j]) ; in for-loop or with the matrix-trick I
> did with DA and DB.
> inbetweenresult = B[*,idx1]
>
> idx2 = Where(inbetweenresult[3,*] = A[1,j]) ; in for-loop or with the
> matrix-trick I did with DA and DB.
> result = inbetweenresult[*,idx2]

Hi,

It doesn't seem to me that Dave has provided sufficient information.
I think the question was not fully fleshed out so it is hard to
provide helpful answers.

For example, is it possible that the coordinates could be temporarily
coerced into integers with losing unique pairings? If that is that
case then he can use the method described by Joost. Or, here is
another tack, is there a certain granularity (or precision) to the
coordinates - measured to the nearest tenth or hundreth perhaps? If
that is the case then he could simply promote the coordinates by
multiplying by 10 (or 100 or whatever) and then convert to integer.

Cheers,
Ben
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: number problem
Next Topic: EARN MONEY $2500-10000 PER WEEK

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 06:39:09 PDT 2025

Total time taken to generate the page: 1.35407 seconds