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 #61281 is a reply to message #61277] Mon, 14 July 2008 01:09 Go to previous messageGo to previous message
Joost Aan de Brugh is currently offline  Joost Aan de Brugh
Messages: 16
Registered: July 2008
Junior Member
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]

Cheers,
Joost
[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 17:22:03 PDT 2025

Total time taken to generate the page: 0.05955 seconds